[svn-commits] tilghman: trunk r194430 - /trunk/main/pbx.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu May 14 11:22:18 CDT 2009


Author: tilghman
Date: Thu May 14 11:22:14 2009
New Revision: 194430

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=194430
Log:
If the timing ended on a zero, then we would loop forever.
(closes issue #14983)
 Reported by: teox
 Patches: 
       20090513__issue14983.diff.txt uploaded by tilghman (license 14)
 Tested by: teox

Modified:
    trunk/main/pbx.c

Modified: trunk/main/pbx.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/pbx.c?view=diff&rev=194430&r1=194429&r2=194430
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Thu May 14 11:22:14 2009
@@ -7083,11 +7083,10 @@
 		/* Fill the mask. Remember that ranges are cyclic */
 		mask |= (1 << end);   /* initialize with last element */
 		while (start != end) {
-			if (start >= max) {
+			mask |= (1 << start);
+			if (++start >= max) {
 				start = 0;
 			}
-			mask |= (1 << start);
-			start++;
 		}
 	}
 	return mask;




More information about the svn-commits mailing list