[asterisk-commits] file: branch file/bridging r79129 - in /team/file/bridging: bridges/ include/...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Aug 10 16:41:02 CDT 2007
Author: file
Date: Fri Aug 10 16:41:02 2007
New Revision: 79129
URL: http://svn.digium.com/view/asterisk?view=rev&rev=79129
Log:
I changed my mind, no longer using the signal method.
Modified:
team/file/bridging/bridges/bridge_softmix.c
team/file/bridging/include/asterisk/bridging.h
team/file/bridging/main/bridging.c
Modified: team/file/bridging/bridges/bridge_softmix.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/bridges/bridge_softmix.c?view=diff&rev=79129&r1=79128&r2=79129
==============================================================================
--- team/file/bridging/bridges/bridge_softmix.c (original)
+++ team/file/bridging/bridges/bridge_softmix.c Fri Aug 10 16:41:02 2007
@@ -93,12 +93,6 @@
return 0;
}
-/* Called when the bridged channel thread should do something */
-static int softmix_bridge_signal(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
-{
- return 0;
-}
-
static struct ast_bridge_technology softmix_bridge = {
.name = "softmix",
.capabilities = AST_BRIDGE_CAPABILITY_MULTIMIX,
@@ -109,7 +103,6 @@
.join = softmix_bridge_join,
.leave = softmix_bridge_leave,
.write = softmix_bridge_write,
- .signal = softmix_bridge_signal,
};
static int unload_module(void)
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=79129&r1=79128&r2=79129
==============================================================================
--- team/file/bridging/include/asterisk/bridging.h (original)
+++ team/file/bridging/include/asterisk/bridging.h Fri Aug 10 16:41:02 2007
@@ -52,7 +52,6 @@
/*! \brief State information about a bridged channel */
enum ast_bridge_channel_state {
AST_BRIDGE_CHANNEL_STATE_WAIT = 0, /*! Waiting for a signal */
- AST_BRIDGE_CHANNEL_STATE_SIGNAL, /*! Bridge wants us to do something in our thread */
AST_BRIDGE_CHANNEL_STATE_END, /*! Bridged channel ended itself */
AST_BRIDGE_CHANNEL_STATE_HANGUP, /*! Bridge requested that this channel be hungup, unless otherwise instructed */
AST_BRIDGE_CHANNEL_STATE_DEPART, /*! Depart from the bridge */
@@ -75,7 +74,6 @@
int (*join)(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel); /*! Callback for when a channel joins a bridge */
int (*leave)(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel); /*! Callback for when a channel leaves a bridge */
int (*write)(struct ast_bridge *bridge, struct ast_bridge_channel *bridged_channel, struct ast_frame *frame); /*! Callback for writing a frame to the bridge */
- int (*signal)(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel); /*! Callback for a bridge channel thread signal */
int (*fd)(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, int fd); /*! Callback for when a file descriptor trips */
int formats; /*! Formats this bridge technology can support */
int suspended:1; /*! Is this bridge technology suspended from use or not? */
Modified: team/file/bridging/main/bridging.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/main/bridging.c?view=diff&rev=79129&r1=79128&r2=79129
==============================================================================
--- team/file/bridging/main/bridging.c (original)
+++ team/file/bridging/main/bridging.c Fri Aug 10 16:41:02 2007
@@ -134,7 +134,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) && !bridge_channel->suspended)
+ if (bridge_channel->state == AST_BRIDGE_CHANNEL_STATE_WAIT && !bridge_channel->suspended)
cs[i++] = bridge_channel->chan;
}
@@ -405,13 +405,7 @@
ast_debug(1, "Bridge channel %p entering signalling wait state.\n", bridge_channel);
ast_cond_wait(&bridge_channel->cond, &bridge->lock);
}
- if (bridge_channel->state == AST_BRIDGE_CHANNEL_STATE_SIGNAL) {
- ast_debug(1, "Bridge channel %p entering signalling state.\n", bridge_channel);
- if (bridge->technology->signal)
- bridge->technology->signal(bridge, bridge_channel);
- /* Switch state back to wait */
- bridge_channel->state = AST_BRIDGE_CHANNEL_STATE_WAIT;
- } else if (bridge_channel->state == AST_BRIDGE_CHANNEL_STATE_END) {
+ if (bridge_channel->state == AST_BRIDGE_CHANNEL_STATE_END) {
ast_debug(1, "Bridge channel %p entering end state.\n", bridge_channel);
break;
} else if (bridge_channel->state == AST_BRIDGE_CHANNEL_STATE_HANGUP) {
More information about the asterisk-commits
mailing list