From 31bb5e6c9eaf8373d7b1b17a6fd84834a0063f2c Mon Sep 17 00:00:00 2001 From: file Date: Mon, 7 May 2007 21:45:01 +0000 Subject: Merged revisions 63285 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r63285 | file | 2007-05-07 17:39:52 -0400 (Mon, 07 May 2007) | 2 lines Properly handle what happens during a masquerade in relation to group counting. (issue #9657 reported by ramonpeek) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@63286 f38db490-d61c-443f-a65b-d21fe96a405b --- main/app.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'main/app.c') diff --git a/main/app.c b/main/app.c index ef25e1ba5..89fdb26d4 100644 --- a/main/app.c +++ b/main/app.c @@ -872,6 +872,20 @@ int ast_app_group_match_get_count(const char *groupmatch, const char *category) return count; } +int ast_app_group_update(struct ast_channel *old, struct ast_channel *new) +{ + struct ast_group_info *gi = NULL; + + AST_LIST_LOCK(&groups); + AST_LIST_TRAVERSE(&groups, gi, list) { + if (gi->chan == old) + gi->chan = new; + } + AST_LIST_UNLOCK(&groups); + + return 0; +} + int ast_app_group_discard(struct ast_channel *chan) { struct ast_group_info *gi = NULL; -- cgit v1.2.3