aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-04-06 17:03:50 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-04-06 17:03:50 +0000
commit523527e9f2088169ed973bffc08cdfbf44126cc6 (patch)
treeafd29938cce9e130c591b3d511aefd84f1413a9b /channels
parent5064705bd7004ab05b28fc2ae5bf8dbef04e3a2b (diff)
actually space out the registrations :) (bug #3104)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5427 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/chan_sip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index f0fb73304..2f053f735 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -10754,11 +10754,12 @@ static void sip_poke_all_peers(void)
/*--- sip_send_all_registers: Send all known registrations */
static void sip_send_all_registers(void)
{
- int ms = (rand() >> 12) & 0x1fff;
+ int ms;
ASTOBJ_CONTAINER_TRAVERSE(&regl, 1, do {
ASTOBJ_WRLOCK(iterator);
if (iterator->expire > -1)
ast_sched_del(sched, iterator->expire);
+ ms = (rand() >> 12) & 0x1fff;
iterator->expire = ast_sched_add(sched, ms, sip_reregister, iterator);
ASTOBJ_UNLOCK(iterator);
} while (0)