From: Scott Griepentrog Date: Mon, 6 Jan 2014 17:31:31 +0000 (+0000) Subject: func_strings: fix for memmove patch test X-Git-Tag: 1.8.26.0-rc1~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c9e8f7f0e1c7720a0261e86369f85266fe61983c;p=thirdparty%2Fasterisk.git func_strings: fix for memmove patch test 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 --- diff --git a/funcs/func_strings.c b/funcs/func_strings.c index caa5e8aaf1..5ac19305eb 100644 --- a/funcs/func_strings.c +++ b/funcs/func_strings.c @@ -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)) {