rendered paste bodyIndex: main/pbx.c
===================================================================
--- main/pbx.c (revision 85850)
+++ main/pbx.c (working copy)
@@ -5803,6 +5803,8 @@
struct varshead *headp;
const char *nametail = name;
+ ast_log(LOG_DEBUG, "Entering pbx_builtin_setvar_helper...variable name: '%s', value:'%s'\n", name, value);
+
/* XXX may need locking on the channel ? */
if (name[strlen(name)-1] == ')') {
char *function = ast_strdupa(name);
@@ -5823,7 +5825,9 @@
if (headp == &globals)
ast_mutex_lock(&globalslock);
AST_LIST_TRAVERSE (headp, newvariable, entries) {
+ ast_log(LOG_DEBUG, "About to compare the contents at %p with nametail\n", newvariable);
if (strcasecmp(ast_var_name(newvariable), nametail) == 0) {
+ ast_log(LOG_DEBUG, "Removing variable at address %p from the list of entries\n", newvariable);
/* there is already such a variable, delete it */
AST_LIST_REMOVE(headp, newvariable, entries);
ast_var_delete(newvariable);