]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
func_strings: fix for memmove patch test
authorScott Griepentrog <sgriepentrog@digium.com>
Mon, 6 Jan 2014 17:31:31 +0000 (17:31 +0000)
committerScott Griepentrog <sgriepentrog@digium.com>
Mon, 6 Jan 2014 17:31:31 +0000 (17:31 +0000)
In r404674 the AST_TEST_DEFINE(test_REPLACE) test was added
that made use of a function that doesn't exist in 1.8. This
fixes that by reverting to directly accessing chan varshead.

Reported by: Tzafrir Cohen
(issue ASTERISK-22910)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@404951 65c4cc65-6c06-0410-ace0-fbb531ad65f3

funcs/func_strings.c

index caa5e8aaf175e1567ff38afd0e92f43017bf8e38..5ac19305ebb547d03112b0d20f3553d0fc54ba2b 100644 (file)
@@ -1666,12 +1666,12 @@ AST_TEST_DEFINE(test_REPLACE)
                        break;
                }
 
-               AST_LIST_INSERT_HEAD(ast_channel_varshead(chan), var, entries);
+               AST_LIST_INSERT_HEAD(&chan->varshead, var, entries);
 
                snprintf(expression, sizeof(expression), "${REPLACE(%s,%s,%s)}", var->name, test_args[i].find_chars, test_args[i].replace_char);
                ast_str_substitute_variables(&str, 0, chan, expression);
 
-               AST_LIST_REMOVE(ast_channel_varshead(chan), var, entries);
+               AST_LIST_REMOVE(&chan->varshead, var, entries);
                ast_var_delete(var);
 
                if (strcasecmp(ast_str_buffer(str), test_args[i].expected)) {