[asterisk-commits] jpeeler: trunk r238583 - /trunk/main/features.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jan 8 11:18:45 CST 2010


Author: jpeeler
Date: Fri Jan  8 11:18:41 2010
New Revision: 238583

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=238583
Log:
Stop trying to find a parking space after traversing the parkinglot one time.

(closes issue #16428)
Reported by: Yasuhiro Konishi

Modified:
    trunk/main/features.c

Modified: trunk/main/features.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/features.c?view=diff&rev=238583&r1=238582&r2=238583
==============================================================================
--- trunk/main/features.c (original)
+++ trunk/main/features.c Fri Jan  8 11:18:41 2010
@@ -754,7 +754,7 @@
 		for (i = start; 1; i++) {
 			if (i == parkinglot->parking_stop + 1) {
 				i = parkinglot->parking_start - 1;
-				continue;
+				break;
 			}
 
 			AST_LIST_TRAVERSE(&parkinglot->parkings, cur, list) {
@@ -762,8 +762,7 @@
 					break;
 				}
 			}
-
-			if (!cur || i == start - 1) {
+			if (!cur) {
 				parking_space = i;
 				break;
 			}




More information about the asterisk-commits mailing list