< Previous by Date Date Index Next by Date >
  Thread Index  

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


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.