Changeset 4041


Ignore:
Timestamp:
Apr 12, 2012 8:51:22 AM (7 years ago)
Author:
nanang
Message:

Fix #1484: apply and send re-register when registration timeout/expire setting is changed in pjsua_modify_acc().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/1.x/pjsip/src/pjsua-lib/pjsua_acc.c

    r4039 r4041  
    966966 
    967967    /* Registration */ 
    968     acc->cfg.reg_timeout = cfg->reg_timeout; 
     968    if (acc->cfg.reg_timeout != cfg->reg_timeout) { 
     969        acc->cfg.reg_timeout = cfg->reg_timeout; 
     970        if (acc->regc != NULL) 
     971            pjsip_regc_update_expires(acc->regc, acc->cfg.reg_timeout); 
     972 
     973        update_reg = PJ_TRUE; 
     974    } 
    969975    acc->cfg.unreg_timeout = cfg->unreg_timeout; 
    970976    acc->cfg.allow_contact_rewrite = cfg->allow_contact_rewrite; 
     
    975981    if (acc->cfg.reg_delay_before_refresh != cfg->reg_delay_before_refresh) { 
    976982        acc->cfg.reg_delay_before_refresh = cfg->reg_delay_before_refresh; 
    977         pjsip_regc_set_delay_before_refresh(acc->regc, 
    978                                             cfg->reg_delay_before_refresh); 
     983        if (acc->regc != NULL) 
     984            pjsip_regc_set_delay_before_refresh(acc->regc, 
     985                                                cfg->reg_delay_before_refresh); 
    979986    } 
    980987 
Note: See TracChangeset for help on using the changeset viewer.