[asterisk-commits] lmadsen: branch 1.8 r323213 - /branches/1.8/main/channel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jun 13 14:51:54 CDT 2011


Author: lmadsen
Date: Mon Jun 13 14:51:52 2011
New Revision: 323213

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=323213
Log:
Avoid dividing by zero with L() option to Dial()

Reported by: nicolasom
Patches:
    
issue-17995.patch - nicolasom (License #5994)

Modified:
    branches/1.8/main/channel.c

Modified: branches/1.8/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/channel.c?view=diff&rev=323213&r1=323212&r2=323213
==============================================================================
--- branches/1.8/main/channel.c (original)
+++ branches/1.8/main/channel.c Mon Jun 13 14:51:52 2011
@@ -7175,7 +7175,7 @@
 		config->nexteventts = ast_tvadd(config->start_time, ast_samp2tv(config->timelimit, 1000));
 		if ((caller_warning || callee_warning) && config->play_warning) {
 			long next_warn = config->play_warning;
-			if (time_left_ms < config->play_warning) {
+			if (time_left_ms < config->play_warning && config->warning_freq > 0) {
 				/* At least one warning was played, which means we are returning after feature */
 				long warns_passed = (config->play_warning - time_left_ms) / config->warning_freq;
 				/* It is 'warns_passed * warning_freq' NOT '(warns_passed + 1) * warning_freq',




More information about the asterisk-commits mailing list