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

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Feb 28 16:18:13 CST 2008


Author: mvanbaak
Date: Thu Feb 28 16:18:13 2008
New Revision: 105115

URL: http://svn.digium.com/view/asterisk?view=rev&rev=105115
Log:
and another place to remove the list item

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=105115&r1=105114&r2=105115
==============================================================================
--- team/group/multiparking/main/features.c (original)
+++ team/group/multiparking/main/features.c Thu Feb 28 16:18:13 2008
@@ -2344,17 +2344,18 @@
 			//	pl->next = pu->next;
 			//else
 			//	curlot->occupiedlots = pu->next;
-			pt = pu;
-			pu = pu->next;
-			con = ast_context_find(pt->parkinglot->parking_con);
+			//pt = pu;
+			//pu = pu->next;
+			con = ast_context_find(pu->parkinglot->parking_con);
 			if (con) {
-				if (ast_context_remove_extension2(con, pt->parkingexten, 1, NULL))
+				if (ast_context_remove_extension2(con, pu->parkingexten, 1, NULL))
 					ast_log(LOG_WARNING, "Whoa, failed to remove the parking extension!\n");
 				else
 					notify_metermaids(pu->parkingexten, curlot->parking_con, AST_DEVICE_NOT_INUSE);
 			} else
 				ast_log(LOG_WARNING, "Whoa, no parking context?\n");
-			free(pt);
+			//free(pt);
+			AST_LIST_REMOVE_CURRENT(&curlot->parkings, list);
 			parkinglot_unref(curlot);
 		} else {	/* still within parking time, process descriptors */
 			for (x = 0; x < AST_MAX_FDS; x++) {




More information about the svn-commits mailing list