[Asterisk-cvs] asterisk pbx.c,1.286,1.287

markster markster
Tue Oct 18 14:00:21 CDT 2005


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv7148

Modified Files:
	pbx.c 
Log Message:
Setting variables should NOT overwrite prefixed (sorry! revert of 5444)


Index: pbx.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx.c,v
retrieving revision 1.286
retrieving revision 1.287
diff -u -d -r1.286 -r1.287
--- pbx.c	18 Oct 2005 17:42:42 -0000	1.286
+++ pbx.c	18 Oct 2005 17:53:57 -0000	1.287
@@ -5885,22 +5885,14 @@
 {
 	struct ast_var_t *newvariable;
 	struct varshead *headp;
-	const char *nametail = name;
 
 	if (name[strlen(name)-1] == ')')
 		return ast_func_write(chan, name, value);
 
 	headp = (chan) ? &chan->varshead : &globals;
 
-	/* For comparison purposes, we have to strip leading underscores */
-	if (*nametail == '_') {
-		nametail++;
-		if (*nametail == '_') 
-			nametail++;
-	}
-
 	AST_LIST_TRAVERSE (headp, newvariable, entries) {
-		if (strcasecmp(ast_var_name(newvariable), nametail) == 0) {
+		if (strcasecmp(ast_var_name(newvariable), name) == 0) {
 			/* there is already such a variable, delete it */
 			AST_LIST_REMOVE(headp, newvariable, entries);
 			ast_var_delete(newvariable);




More information about the svn-commits mailing list