[reSIProcate] Can't use small stale call timeout value

Dmitry Semyonov dsemyonov at dins.ru
Tue Nov 22 05:32:06 CST 2005


Hello all,

Profile::setDefaultStaleCallTime(int secs) does not work as expected 
due to the following code inside 
ClientInviteSession::startStaleCallTimer():

  unsigned long when = mDialog.mDialogSet.getUserProfile()->getDefaultStaleCallTime();
  when += Random::getRandom() % 120

I wanted to set stale call timeout to 4 seconds for fast 
fail-over between servers, and was surprised getting unexpected 
timeouts.

So, the questions is why the random value is added to the predefined 
timeout? Also, if randomization is necessary shouldn't it look like 
the following?
  when += Random::getRandom() % ( when >> 1 )

And definitely, such behaviour has to be documented.

-- 
...Bye..Dmitry.



More information about the resiprocate-devel mailing list