Changes between Version 12 and Version 13 of IPAddressChange


Ignore:
Timestamp:
Sep 9, 2015 6:07:43 AM (4 years ago)
Author:
nanang
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IPAddressChange

    v12 v13  
    176176} 
    177177 }}} 
    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()}}}: 
    179179 {{{ 
    180180static void on_reg_started2(pjsua_acc_id acc_id, pjsua_reg_info *info) 
    181181{ 
    182    struct pjsip_regc_cbparam *rp = info->cbparam; 
    183  
     182    pjsip_regc_info regc_info; 
     183 
     184    pjsip_regc_get_info(info->regc, &regc_info); 
    184185  
    185186    ... 
     
    187188        return; 
    188189 
    189     if (the_transport != rp->rdata->tp_info.transport) { 
    190         /* Registration success */ 
     190    if (the_transport != regc_info.transport) { 
    191191        if (the_transport) { 
    192192            PJ_LOG(3,(THIS_FILE, "xxx: Releasing transport..")); 
     
    198198         */ 
    199199        PJ_LOG(3,(THIS_FILE, "xxx: Saving transport..")); 
    200         the_transport = rp->rdata->tp_info.transport; 
     200        the_transport = regc_info.transport; 
    201201        pjsip_transport_add_ref(the_transport); 
    202202     }