[asterisk-commits] seanbright: branch 10 r355747 - in /branches/10: ./ channels/chan_iax2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Feb 17 13:34:21 CST 2012


Author: seanbright
Date: Fri Feb 17 13:34:17 2012
New Revision: 355747

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=355747
Log:
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.
........

Merged revisions 355746 from http://svn.asterisk.org/svn/asterisk/branches/1.8

Modified:
    branches/10/   (props changed)
    branches/10/channels/chan_iax2.c

Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/10/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/channels/chan_iax2.c?view=diff&rev=355747&r1=355746&r2=355747
==============================================================================
--- branches/10/channels/chan_iax2.c (original)
+++ branches/10/channels/chan_iax2.c Fri Feb 17 13:34:17 2012
@@ -14854,7 +14854,7 @@
 	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) {




More information about the asterisk-commits mailing list