From e3cf311ea66955482cc6c8197c685456aa7f41cc Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Thu, 12 Apr 2012 08:53:59 +0000 Subject: Re #1474: merged r4041 git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4042 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/src/pjsua-lib/pjsua_acc.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'pjsip') diff --git a/pjsip/src/pjsua-lib/pjsua_acc.c b/pjsip/src/pjsua-lib/pjsua_acc.c index 75cc07d9..06c832ba 100644 --- a/pjsip/src/pjsua-lib/pjsua_acc.c +++ b/pjsip/src/pjsua-lib/pjsua_acc.c @@ -993,7 +993,13 @@ PJ_DEF(pj_status_t) pjsua_acc_modify( pjsua_acc_id acc_id, &cfg->auth_pref.algorithm); /* Registration */ - acc->cfg.reg_timeout = cfg->reg_timeout; + if (acc->cfg.reg_timeout != cfg->reg_timeout) { + acc->cfg.reg_timeout = cfg->reg_timeout; + if (acc->regc != NULL) + pjsip_regc_update_expires(acc->regc, acc->cfg.reg_timeout); + + update_reg = PJ_TRUE; + } acc->cfg.unreg_timeout = cfg->unreg_timeout; acc->cfg.allow_contact_rewrite = cfg->allow_contact_rewrite; acc->cfg.reg_retry_interval = cfg->reg_retry_interval; @@ -1002,8 +1008,9 @@ PJ_DEF(pj_status_t) pjsua_acc_modify( pjsua_acc_id acc_id, acc->cfg.register_on_acc_add = cfg->register_on_acc_add; if (acc->cfg.reg_delay_before_refresh != cfg->reg_delay_before_refresh) { acc->cfg.reg_delay_before_refresh = cfg->reg_delay_before_refresh; - pjsip_regc_set_delay_before_refresh(acc->regc, - cfg->reg_delay_before_refresh); + if (acc->regc != NULL) + pjsip_regc_set_delay_before_refresh(acc->regc, + cfg->reg_delay_before_refresh); } /* Normalize registration timeout and refresh delay */ -- cgit v1.2.3