mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-09 11:28:25 +00:00
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
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user