diff options
Diffstat (limited to 'main/app.c')
-rw-r--r-- | main/app.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/main/app.c b/main/app.c index 91441f64e..10b9fea80 100644 --- a/main/app.c +++ b/main/app.c @@ -894,6 +894,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; |