summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorKevin Harwell <kharwell@digium.com>2013-02-19 16:23:29 +0000
committerKevin Harwell <kharwell@digium.com>2013-02-19 16:23:29 +0000
commitf2774606707582097e24054659f0d77c162eded7 (patch)
tree5d5dcc9a5dce2d8bcfd5e102cd6aac42f951236e /apps
parent31b7426115f156d116f5b751f7c494be9c0558f7 (diff)
Confbridge channels staying active when all participants leave.
If you started/stopped recording of a conference multiple times channels would remain active even when all participants left the conference. This was due to the fact that a reference to the confbridge was being added every time a start record command was issued, but when the recording was stopped there was no matching de-reference thus keeping the conference alive. Made sure only a single reference is added for the record thread no matter how many times recording is started/stopped. A de-reference is issued upon thread ending. Note, this issue is being fixed under AST-1088 since it relates to it and should have been corrected along with those modifications. (issue AST-1088) Reported by: John Bigelow ........ Merged revisions 381737 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381741 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r--apps/app_confbridge.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c
index 76a269bb1..edae7b154 100644
--- a/apps/app_confbridge.c
+++ b/apps/app_confbridge.c
@@ -775,8 +775,6 @@ static int conf_start_record(struct conference_bridge *conference_bridge)
*/
static int start_conf_record_thread(struct conference_bridge *conference_bridge)
{
- ao2_ref(conference_bridge, +1); /* give the record thread a ref */
-
conf_start_record(conference_bridge);
/*
@@ -786,6 +784,8 @@ static int start_conf_record_thread(struct conference_bridge *conference_bridge)
return 0;
}
+ ao2_ref(conference_bridge, +1); /* give the record thread a ref */
+
if (ast_pthread_create_background(&conference_bridge->record_thread, NULL, record_thread, conference_bridge)) {
ast_log(LOG_WARNING, "Failed to create recording channel for conference %s\n", conference_bridge->name);
ao2_ref(conference_bridge, -1); /* error so remove ref */