From e9de686a670901655b33b5dc68eab92922a22e8e Mon Sep 17 00:00:00 2001 From: markster Date: Tue, 18 Oct 2005 17:53:57 +0000 Subject: Setting variables should NOT overwrite prefixed (sorry! revert of 5444) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6820 f38db490-d61c-443f-a65b-d21fe96a405b --- pbx.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'pbx.c') diff --git a/pbx.c b/pbx.c index da7d5be60..e1eb1894d 100755 --- a/pbx.c +++ b/pbx.c @@ -5885,22 +5885,14 @@ void pbx_builtin_setvar_helper(struct ast_channel *chan, const char *name, const { 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); -- cgit v1.2.3