[asterisk-commits] file: branch file/bridging r85473 - in /team/file/bridging: include/asterisk/...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Oct 11 14:19:49 CDT 2007
Author: file
Date: Thu Oct 11 14:19:48 2007
New Revision: 85473
URL: http://svn.digium.com/view/asterisk?view=rev&rev=85473
Log:
Make what bridge a channel is part of part of it's channel structure.
Modified:
team/file/bridging/include/asterisk/channel.h
team/file/bridging/main/bridging.c
Modified: team/file/bridging/include/asterisk/channel.h
URL: http://svn.digium.com/view/asterisk/team/file/bridging/include/asterisk/channel.h?view=diff&rev=85473&r1=85472&r2=85473
==============================================================================
--- team/file/bridging/include/asterisk/channel.h (original)
+++ team/file/bridging/include/asterisk/channel.h Thu Oct 11 14:19:48 2007
@@ -407,6 +407,8 @@
void *music_state; /*!< Music State*/
void *generatordata; /*!< Current generator data if there is any */
struct ast_generator *generator; /*!< Current active data generator */
+
+ struct ast_bridge *bridge; /*!< Bridge this channel is participating in */
/*! \brief Who are we bridged to, if we're bridged. Who is proxying for us,
if we are proxied (i.e. chan_agent).
Modified: team/file/bridging/main/bridging.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/main/bridging.c?view=diff&rev=85473&r1=85472&r2=85473
==============================================================================
--- team/file/bridging/main/bridging.c (original)
+++ team/file/bridging/main/bridging.c Thu Oct 11 14:19:48 2007
@@ -574,8 +574,14 @@
ast_mutex_lock(&bridge->lock);
+ /* Boom, record the bridge this channel is part of */
+ chan->bridge = bridge;
+
/* Off to the bridge we go... */
state = bridge_channel_join(bridge, &bridge_channel);
+
+ /* All over ;( */
+ chan->bridge = NULL;
/* All done... we are out of here! */
ast_mutex_unlock(&bridge->lock);
@@ -593,7 +599,11 @@
ast_mutex_lock(&bridge->lock);
+ bridge_channel->chan->bridge = bridge;
+
state = bridge_channel_join(bridge, bridge_channel);
+
+ bridge_channel->chan->bridge = NULL;
ast_mutex_unlock(&bridge->lock);
More information about the asterisk-commits
mailing list