[asterisk-dev] Re: chan_sip - performance,
and OPTIONS poking for 1000s of peers
Benny Amorsen
benny+usenet at amorsen.dk
Sun Nov 26 15:50:37 MST 2006
>>>>> "RM" == Ryan Mitchell <rjm at tcl.net> writes:
RM> int to2 = DEFAULT_FREQ_OK + thread_safe_rand() % 8000 - 40000;
peer-> pokeexpire = ast_sched_add(sched, to2, sip_poke_peer_s, peer);
Would this code get run for each OPTION packet sent? If so, perhaps a
less expensive random function could be found. Or maybe
thread_safe_rand is already cheap enough, it just seems overkill for
something with such a low requirement for randomness quality.
/Benny
More information about the asterisk-dev
mailing list