mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-01 11:32:25 +00:00
Merged revisions 40994 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r40994 | russell | 2006-08-24 15:41:26 -0400 (Thu, 24 Aug 2006) | 11 lines Fix a few issues related to the handling of channel variables - in pbx_builtin_serialize_variables(), the variable list traversal would stop on a variables with empty name/values, which is not appropriate - When removing the GROUP variables, use AST_LIST_REMOVE_CURRENT instead of AST_LIST_REMOVE - During masquerading, when copying the variables list from one channel to the other, using AST_LIST_INSERT_TAIL is not valid for appending a whole list. It leaves the tail pointer of the list invalid. Introduce a new macro, AST_LIST_APPEND_LIST that appends a list properly. (issue #7802, softins) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40995 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -3046,7 +3046,7 @@ static void clone_variables(struct ast_channel *original, struct ast_channel *cl
|
||||
|
||||
AST_LIST_TRAVERSE_SAFE_BEGIN(&original->varshead, varptr, entries) {
|
||||
if (!strncmp(ast_var_name(varptr), GROUP_CATEGORY_PREFIX, strlen(GROUP_CATEGORY_PREFIX))) {
|
||||
AST_LIST_REMOVE(&original->varshead, varptr, entries);
|
||||
AST_LIST_REMOVE_CURRENT(&original->varshead, entries);
|
||||
ast_var_delete(varptr);
|
||||
}
|
||||
}
|
||||
@@ -3055,7 +3055,7 @@ static void clone_variables(struct ast_channel *original, struct ast_channel *cl
|
||||
/* Append variables from clone channel into original channel */
|
||||
/* XXX Is this always correct? We have to in order to keep MACROS working XXX */
|
||||
if (AST_LIST_FIRST(&clone->varshead))
|
||||
AST_LIST_INSERT_TAIL(&original->varshead, AST_LIST_FIRST(&clone->varshead), entries);
|
||||
AST_LIST_APPEND_LIST(&original->varshead, &clone->varshead, entries);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user