diff options
Diffstat (limited to 'main/channel.c')
-rw-r--r-- | main/channel.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/main/channel.c b/main/channel.c index eb5877bd7..fc3a31b61 100644 --- a/main/channel.c +++ b/main/channel.c @@ -3349,22 +3349,6 @@ void ast_channel_inherit_variables(const struct ast_channel *parent, struct ast_ */ static void clone_variables(struct ast_channel *original, struct ast_channel *clone) { - struct ast_var_t *varptr; - - /* we need to remove all app_groupcount related variables from the original - channel before merging in the clone's variables; any groups assigned to the - original channel should be released, only those assigned to the clone - should remain - */ - - 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_CURRENT(&original->varshead, entries); - ast_var_delete(varptr); - } - } - AST_LIST_TRAVERSE_SAFE_END; - /* 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)) @@ -3558,6 +3542,8 @@ int ast_do_masquerade(struct ast_channel *original) original->fds[x] = clone->fds[x]; } + ast_app_group_discard(original); + /* move any whisperer over */ ast_channel_whisper_stop(original); if (ast_test_flag(clone, AST_FLAG_WHISPER)) { |