[svn-commits] file: branch file/bridging r90989 - /team/file/bridging/main/bridging.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Dec 4 15:07:48 CST 2007


Author: file
Date: Tue Dec  4 15:07:48 2007
New Revision: 90989

URL: http://svn.digium.com/view/asterisk?view=rev&rev=90989
Log:
Remove code responsible for moving channels during merging, it did not work as expected.

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

Modified: team/file/bridging/main/bridging.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/main/bridging.c?view=diff&rev=90989&r1=90988&r2=90989
==============================================================================
--- team/file/bridging/main/bridging.c (original)
+++ team/file/bridging/main/bridging.c Tue Dec  4 15:07:48 2007
@@ -983,31 +983,7 @@
 		ast_debug(1, "Reacquired lock on bridge %p, now performing merge to %p\n", bridge1, bridge0);
 	}
 
-	/* Move all channels from bridge1 to bridge0 */
-	while ((bridge_channel = AST_LIST_REMOVE_HEAD(&bridge1->channels, list))) {
-		/* First we decrement the channel count on bridge1 */
-		ast_atomic_fetchadd_int(&bridge1->num, -1);
-		/* Second we part them from bridge1 */
-		if (bridge1->technology->leave) {
-			ast_debug(1, "Giving bridge technology %s notification that %p is leaving bridge %p\n", bridge1->technology->name, bridge_channel, bridge1);
-			if (bridge1->technology->leave(bridge1, bridge_channel))
-				ast_debug(1, "Bridge technology %s failed to allow %p to leave bridge %p\n", bridge1->technology->name, bridge_channel, bridge1);
-		}
-		/* Third we add them to the list on bridge0 */
-		AST_LIST_INSERT_TAIL(&bridge0->channels, bridge_channel, list);
-		/* Fourth we increment the channel count on bridge 0 */
-		ast_atomic_fetchadd_int(&bridge0->num, +1);
-		/* And finally change the channel to point to this bridge */
-		bridge_channel->chan->bridge = bridge0;
-		/* Fifth we make them compatible with bridge0 */
-		bridge_make_compatible(bridge0, bridge_channel);
-		/* Sixth we join them to bridge0 */
-		if (bridge0->technology->join) {
-			ast_debug(1, "Giving bridge technology %s notification that %p is joining bridge %p\n", bridge0->technology->name, bridge_channel, bridge0);
-			if (bridge0->technology->join(bridge0, bridge_channel))
-				ast_debug(1, "Bridge technology %s failed to join %p to bridge %p\n", bridge0->technology->name, bridge_channel, bridge0);
-		}
-	}
+	/* TODO: Move channels from bridge1 to bridge0 _SAFELY_ */
 
 	ast_debug(1, "Bridge %p has been merged into bridge %p\n", bridge1, bridge0);
 




More information about the svn-commits mailing list