Changeset 4947 for pjproject/trunk


Ignore:
Timestamp:
Oct 16, 2014 10:39:35 AM (10 years ago)
Author:
riza
Message:

Misc (re #1782): Fixed unregistration sent twice when calling pjsua_acc_modify with reg_uri is blank.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c

    r4944 r4947  
    12501250            if (reg_sip_uri) 
    12511251                acc->srv_port = reg_sip_uri->port; 
    1252         } else { 
    1253             /* Unregister if registration was set */ 
    1254             if (acc->cfg.reg_uri.slen) 
    1255                 pjsua_acc_set_registration(acc->index, PJ_FALSE); 
    1256             pj_bzero(&acc->cfg.reg_uri, sizeof(acc->cfg.reg_uri)); 
    1257         } 
     1252        }  
    12581253        update_reg = PJ_TRUE; 
    12591254        unreg_first = PJ_TRUE; 
     
    13391334    /* Unregister first */ 
    13401335    if (unreg_first) { 
    1341         if (acc->cfg.reg_uri.slen) 
    1342             pjsua_acc_set_registration(acc->index, PJ_FALSE); 
     1336        pjsua_acc_set_registration(acc->index, PJ_FALSE); 
    13431337        if (acc->regc != NULL) { 
    13441338            pjsip_regc_destroy(acc->regc); 
     
    13461340            acc->contact.slen = 0; 
    13471341            acc->reg_mapped_addr.slen = 0; 
     1342        } 
     1343         
     1344        if (!cfg->reg_uri.slen) { 
     1345            /* Reg URI still needed, delay unset after sending unregister. */ 
     1346            pj_bzero(&acc->cfg.reg_uri, sizeof(acc->cfg.reg_uri)); 
    13481347        } 
    13491348    } 
Note: See TracChangeset for help on using the changeset viewer.