summaryrefslogtreecommitdiff
path: root/pjsip/src/pjsua-lib/pjsua_acc.c
diff options
context:
space:
mode:
authorLiong Sauw Ming <ming@teluu.com>2011-03-15 10:49:59 +0000
committerLiong Sauw Ming <ming@teluu.com>2011-03-15 10:49:59 +0000
commitbfd49295b48a31eae9d7d9d8c018eea8e193179c (patch)
tree735165feb58f2d80c76b60222fc22d248d65e246 /pjsip/src/pjsua-lib/pjsua_acc.c
parent2db53631ab7583e95c0a3a7d27096af651afe753 (diff)
Re #1205: If refresh timer is already running, it will be cancelled and rescheduled with the new delay. This can be useful if app wants to correct the delay after it checks the timeout in the callback.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3444 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/pjsua-lib/pjsua_acc.c')
-rw-r--r--pjsip/src/pjsua-lib/pjsua_acc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_acc.c b/pjsip/src/pjsua-lib/pjsua_acc.c
index 8435738a..09223858 100644
--- a/pjsip/src/pjsua-lib/pjsua_acc.c
+++ b/pjsip/src/pjsua-lib/pjsua_acc.c
@@ -945,11 +945,15 @@ PJ_DEF(pj_status_t) pjsua_acc_modify( pjsua_acc_id acc_id,
/* Registration */
acc->cfg.reg_timeout = cfg->reg_timeout;
- acc->cfg.reg_delay_before_refresh = cfg->reg_delay_before_refresh;
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;
acc->cfg.drop_calls_on_reg_fail = cfg->drop_calls_on_reg_fail;
+ 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);
+ }
/* Normalize registration timeout and refresh delay */
if (acc->cfg.reg_uri.slen ) {