don't reverse variable order during inheritance (issue #5091)
authorKevin P. Fleming <kpfleming@digium.com>
Thu, 1 Sep 2005 21:50:49 +0000 (21:50 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Thu, 1 Sep 2005 21:50:49 +0000 (21:50 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6489 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channel.c

index 56f889b..7e63bbb 100755 (executable)
--- a/channel.c
+++ b/channel.c
@@ -2470,7 +2470,7 @@ void ast_channel_inherit_variables(const struct ast_channel *parent, struct ast_
                case 1:
                        newvar = ast_var_assign(&varname[1], ast_var_value(current));
                        if (newvar) {
-                               AST_LIST_INSERT_HEAD(&child->varshead, newvar, entries);
+                               AST_LIST_INSERT_TAIL(&child->varshead, newvar, entries);
                                if (option_debug)
                                        ast_log(LOG_DEBUG, "Copying soft-transferable variable %s.\n", ast_var_name(newvar));
                        }
@@ -2478,7 +2478,7 @@ void ast_channel_inherit_variables(const struct ast_channel *parent, struct ast_
                case 2:
                        newvar = ast_var_assign(ast_var_full_name(current), ast_var_value(current));
                        if (newvar) {
-                               AST_LIST_INSERT_HEAD(&child->varshead, newvar, entries);
+                               AST_LIST_INSERT_TAIL(&child->varshead, newvar, entries);
                                if (option_debug)
                                        ast_log(LOG_DEBUG, "Copying hard-transferable variable %s.\n", ast_var_name(newvar));
                        }