[svn-commits] kharwell: trunk r381741 - /trunk/apps/app_confbridge.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Feb 19 10:23:33 CST 2013


Author: kharwell
Date: Tue Feb 19 10:23:29 2013
New Revision: 381741

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=381741
Log:
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

Modified:
    trunk/apps/app_confbridge.c

Modified: trunk/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_confbridge.c?view=diff&rev=381741&r1=381740&r2=381741
==============================================================================
--- trunk/apps/app_confbridge.c (original)
+++ trunk/apps/app_confbridge.c Tue Feb 19 10:23:29 2013
@@ -775,8 +775,6 @@
  */
 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);
 
 	/*
@@ -785,6 +783,8 @@
 	if (conference_bridge->record_thread != AST_PTHREADT_NULL) {
 		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);




More information about the svn-commits mailing list