Changeset 476 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_reg.c
- Timestamp:
- May 26, 2006 12:17:46 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_reg.c
r268 r476 60 60 acc->regc = NULL; 61 61 PJ_LOG(3,(THIS_FILE, "%s: unregistration success", 62 acc->local_uri.ptr));62 pjsua.config.acc_config[acc->index].id.ptr)); 63 63 } else { 64 64 PJ_LOG(3, (THIS_FILE, 65 65 "%s: registration success, status=%d (%s), " 66 66 "will re-register in %d seconds", 67 acc->local_uri.ptr,67 pjsua.config.acc_config[acc->index].id.ptr, 68 68 param->code, 69 69 pjsip_get_status_text(param->code)->ptr, … … 78 78 acc->reg_last_code = param->code; 79 79 80 pjsua_ui_on_reg_state(acc->index); 80 if (pjsua.cb.on_reg_state) 81 (*pjsua.cb.on_reg_state)(acc->index); 81 82 } 82 83 … … 85 86 * Update registration. If renew is false, then unregistration will be performed. 86 87 */ 87 voidpjsua_regc_update(int acc_index, pj_bool_t renew)88 PJ_DECL(void) pjsua_regc_update(int acc_index, pj_bool_t renew) 88 89 { 89 90 pj_status_t status = 0; … … 130 131 pj_status_t pjsua_regc_init(int acc_index) 131 132 { 133 pjsua_acc_config *acc_config; 132 134 pj_status_t status; 133 135 134 if (pjsua.acc[acc_index].reg_uri.slen == 0) { 136 acc_config = &pjsua.config.acc_config[acc_index]; 137 138 if (acc_config->reg_uri.slen == 0) { 135 139 PJ_LOG(3,(THIS_FILE, "Registrar URI is not specified")); 136 140 return PJ_SUCCESS; … … 152 156 153 157 status = pjsip_regc_init( pjsua.acc[acc_index].regc, 154 & pjsua.acc[acc_index].reg_uri,155 & pjsua.acc[acc_index].local_uri,156 & pjsua.acc[acc_index].local_uri,157 1, & pjsua.acc[acc_index].contact_uri,158 pjsua.acc[acc_index].reg_timeout);158 &acc_config->reg_uri, 159 &acc_config->id, 160 &acc_config->id, 161 1, &acc_config->contact, 162 acc_config->reg_timeout); 159 163 if (status != PJ_SUCCESS) { 160 164 pjsua_perror(THIS_FILE, … … 164 168 } 165 169 166 pjsip_regc_set_credentials( pjsua.acc[acc_index].regc, 167 pjsua.cred_count, 168 pjsua.cred_info ); 170 if (acc_config->cred_count) { 171 pjsip_regc_set_credentials( pjsua.acc[acc_index].regc, 172 acc_config->cred_count, 173 acc_config->cred_info ); 174 } 169 175 170 176 pjsip_regc_set_route_set( pjsua.acc[acc_index].regc,
Note: See TracChangeset
for help on using the changeset viewer.