[svn-commits] rmudgett: trunk r413455 - in /trunk: ./ apps/app_confbridge.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed May 7 15:59:17 CDT 2014


Author: rmudgett
Date: Wed May  7 15:59:13 2014
New Revision: 413455

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=413455
Log:
app_confbridge: Fixed "CBAnn" channels not going away.

Fixed a ref leak in conf_handle_talker_cb() everytime the conference
bridge was found to report a channel's talker status change.  The
resulting leak caused the "CBAnn" channels and the conference bridge to
never be destroyed.

Thanks to Richard Kenner on the asterisk-user's list for locating the
problem.

Reported by: Richard Kenner
........

Merged revisions 413454 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    trunk/   (props changed)
    trunk/apps/app_confbridge.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: trunk/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_confbridge.c?view=diff&rev=413455&r1=413454&r2=413455
==============================================================================
--- trunk/apps/app_confbridge.c (original)
+++ trunk/apps/app_confbridge.c Wed May  7 15:59:13 2014
@@ -447,7 +447,6 @@
 
 	json_object = ast_json_pack("{s: s}",
 		"conference", conference->name);
-
 	if (!json_object) {
 		return;
 	}
@@ -462,7 +461,6 @@
 		chan,
 		json_object);
 	ast_bridge_unlock(conference->bridge);
-
 	if (!msg) {
 		return;
 	}
@@ -472,7 +470,6 @@
 	} else {
 		stasis_publish(ast_bridge_topic(conference->bridge), msg);
 	}
-
 }
 
 static void send_conf_start_event(struct confbridge_conference *conference)
@@ -1462,9 +1459,10 @@
 static int conf_handle_talker_cb(struct ast_bridge_channel *bridge_channel, void *hook_pvt, int talking)
 {
 	const char *conf_name = hook_pvt;
-	struct confbridge_conference *conference = ao2_find(conference_bridges, conf_name, OBJ_KEY);
+	RAII_VAR(struct confbridge_conference *, conference, NULL, ao2_cleanup);
 	struct ast_json *talking_extras;
 
+	conference = ao2_find(conference_bridges, conf_name, OBJ_KEY);
 	if (!conference) {
 		/* Remove the hook since the conference does not exist. */
 		return -1;
@@ -2191,6 +2189,7 @@
 	struct confbridge_user *user = NULL;
 
 	SCOPED_AO2LOCK(bridge_lock, conference);
+
 	AST_LIST_TRAVERSE(&conference->active_list, user, list) {
 		if (!strcasecmp(ast_channel_name(user->chan), channel) && !user->kicked) {
 			user->kicked = 1;




More information about the svn-commits mailing list