[asterisk-commits] oej: branch group/multiparking r104060 - /team/group/multiparking/main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Feb 23 10:58:06 CST 2008


Author: oej
Date: Sat Feb 23 10:58:05 2008
New Revision: 104060

URL: http://svn.digium.com/view/asterisk?view=rev&rev=104060
Log:
Fix park_call_full

Modified:
    team/group/multiparking/main/features.c

Modified: team/group/multiparking/main/features.c
URL: http://svn.digium.com/view/asterisk/team/group/multiparking/main/features.c?view=diff&rev=104060&r1=104059&r2=104060
==============================================================================
--- team/group/multiparking/main/features.c (original)
+++ team/group/multiparking/main/features.c Sat Feb 23 10:58:05 2008
@@ -486,8 +486,7 @@
 		parking_range = parkinglot->parking_stop - parkinglot->parking_start+1;
 		for (i = 0; i < parking_range; i++) {
 			x = (i + parkinglot->parking_offset) % parking_range + parkinglot->parking_start;
-			cur = parkinglot->occupiedlots; SKREP
-			while (cur) {
+			AST_LIST_TRAVERSE(&parkinglot->parkings, cur, list) {
 				if (cur->parkingnum == x)
 					break;
 			}
@@ -496,8 +495,9 @@
 		}
 
 		if (!(i < parking_range)) {
-			ast_log(LOG_WARNING, "No more parking spaces in parking lot \"%s\"\n", parkinglot->name);
+			ast_log(LOG_WARNING, "No more parking spaces\n");
 			ast_free(pu);
+			AST_LIST_UNLOCK(&parkinglot->parkings);
 			parkinglot_unref(parkinglot);
 			ASTOBJ_UNLOCK(parkinglot);
 			return -1;




More information about the asterisk-commits mailing list