diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-04-25 19:21:54 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-04-25 19:21:54 +0000 |
commit | 6038c1b458cb5fdf4b376054d550a59936775ce4 (patch) | |
tree | 984c0ba0ef8d6d6187522d0e47795733059fdb99 /main/channel.c | |
parent | 9c435dda79d5e9608ab446151502b193391d84e9 (diff) |
Merged revisions 61804 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r61804 | file | 2007-04-25 14:52:50 -0400 (Wed, 25 Apr 2007) | 2 lines
Merge rewritten group counting support. No more storing data on the variable list of the channels. That was bad, mmmk? (issue #7497 reported by sabbathbh)
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@61805 f38db490-d61c-443f-a65b-d21fe96a405b
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 095471598..b598a984e 100644 --- a/main/channel.c +++ b/main/channel.c @@ -3388,22 +3388,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)) @@ -3594,6 +3578,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)) { |