Changeset 3128 for pjproject/trunk/pjsip/src/pjsip-ua/sip_reg.c
- Timestamp:
- Mar 30, 2010 11:13:59 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip-ua/sip_reg.c
r3105 r3128 204 204 info->auto_reg = regc->auto_reg; 205 205 info->interval = regc->expires; 206 info->transport = regc->last_transport; 206 207 207 208 if (regc->has_tsx) … … 1203 1204 regc->current_op = REGC_REGISTERING; 1204 1205 1206 /* Prevent deletion of tdata, e.g: when something wrong in sending, 1207 * we need tdata to retrieve the transport. 1208 */ 1209 pjsip_tx_data_add_ref(tdata); 1210 1205 1211 status = pjsip_endpt_send_request(regc->endpt, tdata, REGC_TSX_TIMEOUT, 1206 1212 regc, &tsx_callback); … … 1209 1215 } 1210 1216 1217 /* Get last transport used and add reference to it */ 1218 if (tdata->tp_info.transport != regc->last_transport) { 1219 if (regc->last_transport) { 1220 pjsip_transport_dec_ref(regc->last_transport); 1221 regc->last_transport = NULL; 1222 } 1223 1224 if (tdata->tp_info.transport) { 1225 regc->last_transport = tdata->tp_info.transport; 1226 pjsip_transport_add_ref(regc->last_transport); 1227 } 1228 } 1229 1230 /* Release tdata */ 1231 pjsip_tx_data_dec_ref(tdata); 1232 1211 1233 pj_lock_release(regc->lock); 1212 1234
Note: See TracChangeset
for help on using the changeset viewer.