Changes between Version 12 and Version 13 of IPAddressChange
- Timestamp:
- Sep 9, 2015 6:07:43 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
IPAddressChange
v12 v13 176 176 } 177 177 }}} 178 Starting from release 2.4, we have a new callback {{{on_reg_started2()}}} (for more details, please refer to ticket #1825), which allows application to get the transport much earlier, i.e. when the registration process begins. This allows application to close the transport before connecting state. So, you can choose to split the implementation in {{{on_reg_state2()}}} above into two callbacks {{{on_reg_started2()}}} and {{{on_reg_state2()}}}:178 '''New''': Starting from release 2.4, we have a new callback {{{on_reg_started2()}}} (for more details, please refer to ticket #1825), which allows application to get the transport much earlier, i.e. when the registration process begins. This allows application to close the transport before connecting state. So, you can choose to split the implementation in {{{on_reg_state2()}}} above into two callbacks {{{on_reg_started2()}}} and {{{on_reg_state2()}}}: 179 179 {{{ 180 180 static void on_reg_started2(pjsua_acc_id acc_id, pjsua_reg_info *info) 181 181 { 182 struct pjsip_regc_cbparam *rp = info->cbparam; 183 182 pjsip_regc_info regc_info; 183 184 pjsip_regc_get_info(info->regc, ®c_info); 184 185 185 186 ... … … 187 188 return; 188 189 189 if (the_transport != rp->rdata->tp_info.transport) { 190 /* Registration success */ 190 if (the_transport != regc_info.transport) { 191 191 if (the_transport) { 192 192 PJ_LOG(3,(THIS_FILE, "xxx: Releasing transport..")); … … 198 198 */ 199 199 PJ_LOG(3,(THIS_FILE, "xxx: Saving transport..")); 200 the_transport = r p->rdata->tp_info.transport;200 the_transport = regc_info.transport; 201 201 pjsip_transport_add_ref(the_transport); 202 202 }