[svn-commits] rmudgett: branch rmudgett/parking r331574 - /team/rmudgett/parking/main/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Aug 11 12:38:50 CDT 2011


Author: rmudgett
Date: Thu Aug 11 12:38:47 2011
New Revision: 331574

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=331574
Log:
Fix "deleted" parking lots getting activated.

Found by jrose reviewing the parking patch.

Modified:
    team/rmudgett/parking/main/features.c

Modified: team/rmudgett/parking/main/features.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/parking/main/features.c?view=diff&rev=331574&r1=331573&r2=331574
==============================================================================
--- team/rmudgett/parking/main/features.c (original)
+++ team/rmudgett/parking/main/features.c Thu Aug 11 12:38:47 2011
@@ -6304,6 +6304,7 @@
 
 	if (parkinglot->the_mark) {
 		if (AST_LIST_EMPTY(&parkinglot->parkings)) {
+			/* This parking lot can actually be deleted. */
 			return CMP_MATCH;
 		}
 		/* Try reloading later when parking lot is empty. */
@@ -6320,6 +6321,14 @@
 static int parkinglot_activate_cb(void *obj, void *arg, int flags)
 {
 	struct ast_parkinglot *parkinglot = obj;
+
+	if (parkinglot->the_mark) {
+		/*
+		 * Don't activate a parking lot that still bears the_mark since
+		 * it is effectively deleted.
+		 */
+		return 0;
+	}
 
 	if (parkinglot_activate(parkinglot)) {
 		/*




More information about the svn-commits mailing list