[asterisk-commits] file: branch file/bridging r176074 - /team/file/bridging/main/bridging.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Feb 16 10:25:43 CST 2009


Author: file
Date: Mon Feb 16 10:25:43 2009
New Revision: 176074

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=176074
Log:
Handle return values from the bridging technology in a few places.

Modified:
    team/file/bridging/main/bridging.c

Modified: team/file/bridging/main/bridging.c
URL: http://svn.digium.com/svn-view/asterisk/team/file/bridging/main/bridging.c?view=diff&rev=176074&r1=176073&r2=176074
==============================================================================
--- team/file/bridging/main/bridging.c (original)
+++ team/file/bridging/main/bridging.c Mon Feb 16 10:25:43 2009
@@ -344,7 +344,7 @@
 	ast_debug(1, "Started bridge thread for %p\n", bridge);
 
 	/* Loop around until we are told to stop */
-	while (!bridge->stop && bridge->array_num) {
+	while (!bridge->stop && bridge->array_num && !res) {
 		/* In case the refresh bit was set simply set it back to off */
 		bridge->refresh = 0;
 
@@ -463,6 +463,8 @@
 		ast_debug(1, "Giving bridge technology %s the bridge structure %p to setup\n", bridge->technology->name, bridge);
 		if (bridge->technology->create(bridge)) {
 			ast_debug(1, "Bridge technology %s failed to setup bridge structure %p\n", bridge->technology->name, bridge);
+			ao2_ref(bridge, -1);
+			bridge = NULL;
 		}
 	}
 




More information about the asterisk-commits mailing list