diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-05-07 21:39:52 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-05-07 21:39:52 +0000 |
commit | 0870f9f84a98a3f9f1c6a848e4472be77efa6497 (patch) | |
tree | 68d77327e950e350142689577dc192bf9d59993e /app.c | |
parent | 3c4a8564079c294e0fb47d8387ed95844e5d4770 (diff) |
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.2@63285 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'app.c')
-rw-r--r-- | app.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -1113,6 +1113,20 @@ int ast_app_group_match_get_count(char *groupmatch, 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; |