summaryrefslogtreecommitdiff
path: root/channels/chan_iax2.c
diff options
context:
space:
mode:
authorSean Bright <sean@malleable.com>2012-02-17 19:35:11 +0000
committerSean Bright <sean@malleable.com>2012-02-17 19:35:11 +0000
commit7c373d8c1373569e5d9f57ba4a909ea8ac2572cb (patch)
tree1a524c507667d209b0538b8591dc8fcb0aa00ebe /channels/chan_iax2.c
parent8a20faa8d7c5b7feea2d8580172196d197c20835 (diff)
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. ........ Merged revisions 355746 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 355747 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_iax2.c')
-rw-r--r--channels/chan_iax2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 3e5d84f42..8bdde9bdf 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -14750,7 +14750,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) {