diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-08-24 19:41:26 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-08-24 19:41:26 +0000 |
commit | 370a18c2c2fd8fbd903abf3fd5cefaab882b86d9 (patch) | |
tree | 8bcbcbc19497fc2168eda4cf3bf413ecd67a4e55 /pbx.c | |
parent | 5e8071dc081904b4247cc5fe68045e8ad5a829bc (diff) |
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: http://svn.digium.com/svn/asterisk/branches/1.2@40994 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx.c')
-rw-r--r-- | pbx.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -5906,9 +5906,7 @@ int pbx_builtin_serialize_variables(struct ast_channel *chan, char *buf, size_t memset(buf, 0, size); AST_LIST_TRAVERSE(&chan->varshead, variables, entries) { - if(variables && - (var=ast_var_name(variables)) && (val=ast_var_value(variables)) && - !ast_strlen_zero(var) && !ast_strlen_zero(val)) { + if ((var = ast_var_name(variables)) && (val = ast_var_value(variables))) { if (ast_build_string(&buf, &size, "%s=%s\n", var, val)) { ast_log(LOG_ERROR, "Data Buffer Size Exceeded!\n"); break; |