summaryrefslogtreecommitdiff
path: root/pjsip/src/pjsua2
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2014-11-04 08:00:15 +0000
committerNanang Izzuddin <nanang@teluu.com>2014-11-04 08:00:15 +0000
commit58ecec36e6e30a9f9066381e1a8e1751bfd94671 (patch)
tree953900613ae387dec82743df8fb3ba0e169bd4a1 /pjsip/src/pjsua2
parent5d027102466dca0528f6ac0da87a23517f6a3f07 (diff)
Close #1802: Configurable randomized value range for auto re-registration interval.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4957 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/pjsua2')
-rw-r--r--pjsip/src/pjsua2/account.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/pjsip/src/pjsua2/account.cpp b/pjsip/src/pjsua2/account.cpp
index 533b8211..cb4fe6da 100644
--- a/pjsip/src/pjsua2/account.cpp
+++ b/pjsip/src/pjsua2/account.cpp
@@ -38,6 +38,7 @@ void AccountRegConfig::readObject(const ContainerNode &node) throw(Error)
NODE_READ_UNSIGNED (this_node, timeoutSec);
NODE_READ_UNSIGNED (this_node, retryIntervalSec);
NODE_READ_UNSIGNED (this_node, firstRetryIntervalSec);
+ NODE_READ_UNSIGNED (this_node, randomRetryIntervalSec);
NODE_READ_UNSIGNED (this_node, delayBeforeRefreshSec);
NODE_READ_BOOL (this_node, dropCallsOnFail);
NODE_READ_UNSIGNED (this_node, unregWaitMsec);
@@ -55,6 +56,7 @@ void AccountRegConfig::writeObject(ContainerNode &node) const throw(Error)
NODE_WRITE_UNSIGNED (this_node, timeoutSec);
NODE_WRITE_UNSIGNED (this_node, retryIntervalSec);
NODE_WRITE_UNSIGNED (this_node, firstRetryIntervalSec);
+ NODE_WRITE_UNSIGNED (this_node, randomRetryIntervalSec);
NODE_WRITE_UNSIGNED (this_node, delayBeforeRefreshSec);
NODE_WRITE_BOOL (this_node, dropCallsOnFail);
NODE_WRITE_UNSIGNED (this_node, unregWaitMsec);
@@ -318,6 +320,7 @@ void AccountConfig::toPj(pjsua_acc_config &ret) const
ret.reg_timeout = regConfig.timeoutSec;
ret.reg_retry_interval = regConfig.retryIntervalSec;
ret.reg_first_retry_interval= regConfig.firstRetryIntervalSec;
+ ret.reg_retry_random_interval= regConfig.randomRetryIntervalSec;
ret.reg_delay_before_refresh= regConfig.delayBeforeRefreshSec;
ret.drop_calls_on_reg_fail = regConfig.dropCallsOnFail;
ret.unreg_timeout = regConfig.unregWaitMsec;
@@ -445,6 +448,7 @@ void AccountConfig::fromPj(const pjsua_acc_config &prm,
regConfig.timeoutSec = prm.reg_timeout;
regConfig.retryIntervalSec = prm.reg_retry_interval;
regConfig.firstRetryIntervalSec = prm.reg_first_retry_interval;
+ regConfig.randomRetryIntervalSec = prm.reg_retry_random_interval;
regConfig.delayBeforeRefreshSec = prm.reg_delay_before_refresh;
regConfig.dropCallsOnFail = PJ2BOOL(prm.drop_calls_on_reg_fail);
regConfig.unregWaitMsec = prm.unreg_timeout;