[asterisk-commits] branch 1.2 r15896 - /branches/1.2/include/asterisk/linkedlists.h

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Mar 28 17:32:11 MST 2006


Author: kpfleming
Date: Tue Mar 28 18:32:10 2006
New Revision: 15896

URL: http://svn.digium.com/view/asterisk?rev=15896&view=rev
Log:
ensure that list traversal loops which skip entries properly update the 'previous entry' pointer so when entries _are_ removed the list does not get damaged

Modified:
    branches/1.2/include/asterisk/linkedlists.h

Modified: branches/1.2/include/asterisk/linkedlists.h
URL: http://svn.digium.com/view/asterisk/branches/1.2/include/asterisk/linkedlists.h?rev=15896&r1=15895&r2=15896&view=diff
==============================================================================
--- branches/1.2/include/asterisk/linkedlists.h (original)
+++ branches/1.2/include/asterisk/linkedlists.h Tue Mar 28 18:32:10 2006
@@ -1,7 +1,7 @@
 /*
  * Asterisk -- An open source telephony toolkit.
  *
- * Copyright (C) 1999 - 2005, Digium, Inc.
+ * Copyright (C) 1999 - 2006, Digium, Inc.
  *
  * Mark Spencer <markster at digium.com>
  * Kevin P. Fleming <kpfleming at digium.com>
@@ -279,6 +279,7 @@
 	      __list_next = (var) ? (var)->field.next : NULL;				\
 	     (var);									\
 	     __list_prev = __new_prev, (var) = __list_next,				\
+	     __new_prev = (var),							\
 	     __list_next = (var) ? (var)->field.next : NULL				\
 	    )
 



More information about the asterisk-commits mailing list