mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-26 22:30:28 +00:00
Pass the correct value to ast_timer_set_rate() for IAX2 trunking.
IAX2 uses the trunkfreq variable to determine how often to send trunk packets, but this value is in milliseconds while ast_timer_set_rate() expects the rate argument to be ticks per second. So we divide 1000 by trunkfreq and pass that in instead. With a default of 20ms, this change makes IAX2 send trunk packets every 20ms instead of every 50ms. Tracked down by myself and Bob Wienholt. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@355746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -14716,7 +14716,7 @@ static int load_module(void)
|
||||
jb_setoutput(jb_error_output, jb_warning_output, NULL);
|
||||
|
||||
if ((timer = ast_timer_open())) {
|
||||
ast_timer_set_rate(timer, trunkfreq);
|
||||
ast_timer_set_rate(timer, 1000 / trunkfreq);
|
||||
}
|
||||
|
||||
if (set_config(config, 0) == -1) {
|
||||
|
||||
Reference in New Issue
Block a user