From 58ecec36e6e30a9f9066381e1a8e1751bfd94671 Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Tue, 4 Nov 2014 08:00:15 +0000 Subject: 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 --- pjsip/src/pjsua2/account.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pjsip/src/pjsua2') 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; -- cgit v1.2.3