Changeset 4523


Ignore:
Timestamp:
May 23, 2013 7:41:17 AM (7 years ago)
Author:
nanang
Message:

Fix #1669: When (account/global) proxy setting is changed, unregister and reset registration internal state (acc->regc) before performing re-registration. The same mechanism is also applied for any account config changes on transport, credential info, or auth preference.

File:
1 edited

Legend:

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

    r4456 r4523  
    925925        acc->cfg.transport_id = cfg->transport_id; 
    926926        update_reg = PJ_TRUE; 
     927        unreg_first = PJ_TRUE; 
    927928    } 
    928929 
     
    992993        acc->cfg.reg_use_proxy = cfg->reg_use_proxy; 
    993994        update_reg = PJ_TRUE; 
     995        unreg_first = PJ_TRUE; 
    994996    } 
    995997 
     
    10121014 
    10131015        update_reg = PJ_TRUE; 
     1016        unreg_first = PJ_TRUE; 
    10141017    } 
    10151018 
     
    10361039 
    10371040        update_reg = PJ_TRUE; 
     1041        unreg_first = PJ_TRUE; 
    10381042    } 
    10391043 
     
    10891093            acc->cred[acc->cred_cnt++] = pjsua_var.ua_cfg.cred_info[i]; 
    10901094        } 
     1095 
     1096        update_reg = PJ_TRUE; 
     1097        unreg_first = PJ_TRUE; 
    10911098    } 
    10921099 
    10931100    /* Authentication preference */ 
    10941101    acc->cfg.auth_pref.initial_auth = cfg->auth_pref.initial_auth; 
    1095     if (pj_strcmp(&acc->cfg.auth_pref.algorithm, &cfg->auth_pref.algorithm)) 
     1102    if (pj_strcmp(&acc->cfg.auth_pref.algorithm, &cfg->auth_pref.algorithm)) { 
    10961103        pj_strdup_with_null(acc->pool, &acc->cfg.auth_pref.algorithm,  
    10971104                            &cfg->auth_pref.algorithm); 
     1105        update_reg = PJ_TRUE; 
     1106        unreg_first = PJ_TRUE; 
     1107    } 
    10981108 
    10991109    /* Registration */ 
Note: See TracChangeset for help on using the changeset viewer.