Changeset 683 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c
- Timestamp:
- Aug 15, 2006 1:11:22 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c
r635 r683 44 44 45 45 /* 46 * Set default account 47 */ 48 PJ_DEF(pj_status_t) pjsua_acc_set_default(pjsua_acc_id acc_id) 49 { 50 pjsua_var.default_acc = acc_id; 51 return PJ_SUCCESS; 52 } 53 54 55 /* 56 * Get default account. 57 */ 58 PJ_DEF(pjsua_acc_id) pjsua_acc_get_default(void) 59 { 60 return pjsua_var.default_acc; 61 } 62 63 64 /* 46 65 * Copy account configuration. 47 66 */ … … 725 744 sip_uri = pjsip_uri_get_uri(uri); 726 745 746 /* See if default acc match */ 747 if (pjsua_var.default_acc != PJSUA_INVALID_ID && 748 pj_stricmp(&pjsua_var.acc[pjsua_var.default_acc].srv_domain, &sip_uri->host)==0 && 749 pjsua_var.acc[pjsua_var.default_acc].srv_port == sip_uri->port) 750 { 751 acc_id = pjsua_var.default_acc; 752 } else { 753 acc_id = PJ_ARRAY_SIZE(pjsua_var.acc); 754 } 755 727 756 /* Find matching domain AND port */ 728 for (acc_id=0; acc_id<PJ_ARRAY_SIZE(pjsua_var.acc); ++acc_id) { 729 if (!pjsua_var.acc[acc_id].valid) 730 continue; 731 if (pj_stricmp(&pjsua_var.acc[acc_id].srv_domain, &sip_uri->host)==0 && 732 pjsua_var.acc[acc_id].srv_port == sip_uri->port) 733 break; 757 if (acc_id == PJ_ARRAY_SIZE(pjsua_var.acc)) { 758 for (acc_id=0; acc_id<PJ_ARRAY_SIZE(pjsua_var.acc); ++acc_id) { 759 if (!pjsua_var.acc[acc_id].valid) 760 continue; 761 if (pj_stricmp(&pjsua_var.acc[acc_id].srv_domain, &sip_uri->host)==0 && 762 pjsua_var.acc[acc_id].srv_port == sip_uri->port) 763 break; 764 } 734 765 } 735 766
Note: See TracChangeset
for help on using the changeset viewer.