summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2012-04-12 08:53:59 +0000
committerNanang Izzuddin <nanang@teluu.com>2012-04-12 08:53:59 +0000
commite3cf311ea66955482cc6c8197c685456aa7f41cc (patch)
tree9c6056ca1a2e84be49789c8127d9a58deee5e65b
parent1077e0cb673a51daf937d5ef6e96fb88e7e52495 (diff)
Re #1474: merged r4041
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4042 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r--pjsip/src/pjsua-lib/pjsua_acc.c13
1 files changed, 10 insertions, 3 deletions
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 */