Changeset 253 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_reg.c
- Timestamp:
- Mar 1, 2006 7:29:10 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_reg.c
r238 r253 87 87 void pjsua_regc_update(int acc_index, pj_bool_t renew) 88 88 { 89 pj_status_t status ;90 pjsip_tx_data *tdata ;89 pj_status_t status = 0; 90 pjsip_tx_data *tdata = 0; 91 91 92 92 if (renew) { … … 99 99 } 100 100 } 101 status = pjsip_regc_register(pjsua.acc[acc_index].regc, 1, &tdata); 101 if (!pjsua.acc[acc_index].regc) 102 return; 103 104 status = pjsip_regc_register(pjsua.acc[acc_index].regc, 1, 105 &tdata); 106 102 107 } else { 103 108 if (pjsua.acc[acc_index].regc == NULL) { … … 127 132 pj_status_t status; 128 133 134 if (pjsua.acc[acc_index].reg_uri.slen == 0) { 135 PJ_LOG(3,(THIS_FILE, "Registrar URI is not specified")); 136 return PJ_SUCCESS; 137 } 138 129 139 /* initialize SIP registration if registrar is configured */ 130 if (pjsua.acc[acc_index].reg_uri.slen) {131 140 132 133 134 135 141 status = pjsip_regc_create( pjsua.endpt, 142 &pjsua.acc[acc_index], 143 ®c_cb, 144 &pjsua.acc[acc_index].regc); 136 145 137 138 139 140 141 146 if (status != PJ_SUCCESS) { 147 pjsua_perror(THIS_FILE, "Unable to create client registration", 148 status); 149 return status; 150 } 142 151 143 152 144 145 146 147 148 149 150 151 152 153 154 155 153 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); 159 if (status != PJ_SUCCESS) { 160 pjsua_perror(THIS_FILE, 161 "Client registration initialization error", 162 status); 163 return status; 164 } 156 165 157 158 159 166 pjsip_regc_set_credentials( pjsua.acc[acc_index].regc, 167 pjsua.cred_count, 168 pjsua.cred_info ); 160 169 161 pjsip_regc_set_route_set( pjsua.acc[acc_index].regc, 162 &pjsua.acc[acc_index].route_set ); 163 } 170 pjsip_regc_set_route_set( pjsua.acc[acc_index].regc, 171 &pjsua.acc[acc_index].route_set ); 164 172 165 173 return PJ_SUCCESS;
Note: See TracChangeset
for help on using the changeset viewer.