[asterisk-commits] file: branch file/bridging r78176 - in /team/file/bridging: include/asterisk/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Aug 6 10:47:30 CDT 2007


Author: file
Date: Mon Aug  6 10:47:29 2007
New Revision: 78176

URL: http://svn.digium.com/view/asterisk?view=rev&rev=78176
Log:
Add ability for a bridged channel to be suspended from a bridge. This basically allows control of a channel to be temporarily handled elsewhere.

Modified:
    team/file/bridging/include/asterisk/bridging.h
    team/file/bridging/main/bridging.c

Modified: team/file/bridging/include/asterisk/bridging.h
URL: http://svn.digium.com/view/asterisk/team/file/bridging/include/asterisk/bridging.h?view=diff&rev=78176&r1=78175&r2=78176
==============================================================================
--- team/file/bridging/include/asterisk/bridging.h (original)
+++ team/file/bridging/include/asterisk/bridging.h Mon Aug  6 10:47:29 2007
@@ -87,6 +87,7 @@
 	void *bridge_pvt;                        /*! Private information unique to the bridge technology (not always needed) */
 	pthread_t thread;                        /*! Thread handling the bridged channel */
 	int fds[4];                              /*! Additional file descriptors to watch */
+	int suspended:1;                         /*! Is this bridged channel suspended from the bridge or not? */
 	AST_LIST_ENTRY(ast_bridge_channel) list; /*! Linked list information */
 };
 

Modified: team/file/bridging/main/bridging.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/main/bridging.c?view=diff&rev=78176&r1=78175&r2=78176
==============================================================================
--- team/file/bridging/main/bridging.c (original)
+++ team/file/bridging/main/bridging.c Mon Aug  6 10:47:29 2007
@@ -135,7 +135,7 @@
 
 			/* Now we have to add each channel */
 			AST_LIST_TRAVERSE(&bridge->channels, bridge_channel, list) {
-				if (bridge_channel->state == AST_BRIDGE_CHANNEL_STATE_WAIT || bridge_channel->state == AST_BRIDGE_CHANNEL_STATE_SIGNAL)
+				if ((bridge_channel->state == AST_BRIDGE_CHANNEL_STATE_WAIT || bridge_channel->state == AST_BRIDGE_CHANNEL_STATE_SIGNAL) && !bridge_channel->suspended)
 					cs[i++] = bridge_channel->chan;
 			}
 




More information about the asterisk-commits mailing list