mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-08 02:48:29 +00:00
Slow down the registrations to space them out
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -10128,9 +10128,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;
|
||||
ASTOBJ_CONTAINER_TRAVERSE(®l, 1, do {
|
||||
ASTOBJ_WRLOCK(iterator);
|
||||
__sip_do_register(iterator);
|
||||
if (iterator->expire > -1)
|
||||
ast_sched_del(sched, iterator->expire);
|
||||
iterator->expire = ast_sched_add(sched, ms, sip_reregister, iterator);
|
||||
ASTOBJ_UNLOCK(iterator);
|
||||
} while (0)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user