[svn-commits] mvanbaak: branch group/multiparking r105112 - /team/group/multiparking/main/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Feb 28 15:54:01 CST 2008


Author: mvanbaak
Date: Thu Feb 28 15:54:01 2008
New Revision: 105112

URL: http://svn.digium.com/view/asterisk?view=rev&rev=105112
Log:
check in ast_list_traverse etc I have so far

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=105112&r1=105111&r2=105112
==============================================================================
--- team/group/multiparking/main/features.c (original)
+++ team/group/multiparking/main/features.c Thu Feb 28 15:54:01 2008
@@ -2266,9 +2266,13 @@
 	int res = 0;
 
 	parkinglot_addref(curlot);
-SKREP - needs AST LIST TRAVERSAL STUFF!
-	pu = curlot->occupiedlots;
-	while(pu) {
+	ASTOBJ_WRLOCK(curlot);
+	/* Lock parking list */
+	AST_LIST_LOCK(&curlot->parkings);
+	AST_LIST_TRAVERSE(&curlot->parkings, pu, list) {
+
+//SKREP - needs AST LIST TRAVERSAL STUFF!
+//	pu = curlot->occupiedlots;
 		struct ast_channel *chan = pu->chan;	/* shorthand */
 		int tms;        /* timeout for this item */
 		int x;          /* fd index in channel */
@@ -2276,7 +2280,7 @@
 
 		if (pu->notquiteyet) { /* Pretend this one isn't here yet */
 			pl = pu;
-			pu = pu->next;
+			pu = pu->parkfindnext;
 			continue;
 		}
 		tms = ast_tvdiff_ms(ast_tvnow(), pu->start);
@@ -2424,6 +2428,9 @@
 			}
 		}
 	}
+	AST_LIST_UNLOCK(&curlot->parkings);
+
+	ASTOBJ_UNLOCK(curlot);
 	return res;
 }
 




More information about the svn-commits mailing list