[asterisk-commits] mmichelson: branch 1.6.2 r243490 - in /branches/1.6.2: ./ main/pbx.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jan 27 12:10:20 CST 2010


Author: mmichelson
Date: Wed Jan 27 12:10:16 2010
New Revision: 243490

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=243490
Log:
Merged revisions 243487 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r243487 | mmichelson | 2010-01-27 12:08:02 -0600 (Wed, 27 Jan 2010) | 9 lines
  
  Merged revisions 243486 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r243486 | mmichelson | 2010-01-27 12:06:43 -0600 (Wed, 27 Jan 2010) | 3 lines
    
    Use a safe list traversal while checking for duplicate vars in pbx_builtin_setvar_helper.
  ........
................

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/main/pbx.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.2/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/main/pbx.c?view=diff&rev=243490&r1=243489&r2=243490
==============================================================================
--- branches/1.6.2/main/pbx.c (original)
+++ branches/1.6.2/main/pbx.c Wed Jan 27 12:10:16 2010
@@ -9048,14 +9048,15 @@
 			nametail++;
 	}
 
-	AST_LIST_TRAVERSE (headp, newvariable, entries) {
+	AST_LIST_TRAVERSE_SAFE_BEGIN(headp, newvariable, entries) {
 		if (strcasecmp(ast_var_name(newvariable), nametail) == 0) {
 			/* there is already such a variable, delete it */
-			AST_LIST_REMOVE(headp, newvariable, entries);
+			AST_LIST_REMOVE_CURRENT(entries);
 			ast_var_delete(newvariable);
 			break;
 		}
 	}
+	AST_LIST_TRAVERSE_SAFE_END;
 
 	if (value) {
 		if (headp == &globals)




More information about the asterisk-commits mailing list