[asterisk-commits] mmichelson: branch 1.6.1 r243489 - in /branches/1.6.1: ./ main/pbx.c

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


Author: mmichelson
Date: Wed Jan 27 12:09:43 2010
New Revision: 243489

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=243489
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.1/   (props changed)
    branches/1.6.1/main/pbx.c

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

Modified: branches/1.6.1/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.1/main/pbx.c?view=diff&rev=243489&r1=243488&r2=243489
==============================================================================
--- branches/1.6.1/main/pbx.c (original)
+++ branches/1.6.1/main/pbx.c Wed Jan 27 12:09:43 2010
@@ -8477,14 +8477,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