diff options
author | Mark Spencer <markster@digium.com> | 2005-10-18 17:53:57 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2005-10-18 17:53:57 +0000 |
commit | a16432e294474cd21997d5fe8e5498e2536a436f (patch) | |
tree | f7317c91ba8db01cb3c7d883268cee0102e0b778 /pbx.c | |
parent | e634c61ef8b2a70b2d501f25453521de8ec7ab31 (diff) |
Setting variables should NOT overwrite prefixed (sorry! revert of 5444)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'pbx.c')
-rwxr-xr-x | pbx.c | 10 |
1 files changed, 1 insertions, 9 deletions
@@ -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); |