summaryrefslogtreecommitdiff
path: root/main/bridge_channel.c
diff options
context:
space:
mode:
authorJonathan Rose <jrose@digium.com>2013-07-26 16:34:56 +0000
committerJonathan Rose <jrose@digium.com>2013-07-26 16:34:56 +0000
commit9a46c1d0199e5e3627665b68f88d4ec21f09d2a9 (patch)
treeb97e9093f330402a1e2527591bec391612f0f9ee /main/bridge_channel.c
parenteec3150a8ac1125ce8c98d741ea3dce0aa72c2f5 (diff)
Add name argument to BridgeWait() so multiple holding bridges may be used
Changes arguments for BridgeWait from BridgeWait(role, options) to BridgeWait(bridge_name, role, options). Now multiple holding bridges may be created and referenced by this application. (closes issue ASTERISK-21922) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2642/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/bridge_channel.c')
-rw-r--r--main/bridge_channel.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/main/bridge_channel.c b/main/bridge_channel.c
index 1164e4f67..cec3d1ad1 100644
--- a/main/bridge_channel.c
+++ b/main/bridge_channel.c
@@ -1794,8 +1794,9 @@ static void bridge_channel_event_join_leave(struct ast_bridge_channel *bridge_ch
}
/*! \brief Join a channel to a bridge and handle anything the bridge may want us to do */
-void bridge_channel_internal_join(struct ast_bridge_channel *bridge_channel)
+int bridge_channel_internal_join(struct ast_bridge_channel *bridge_channel)
{
+ int res = 0;
ast_format_copy(&bridge_channel->read_format, ast_channel_readformat(bridge_channel->chan));
ast_format_copy(&bridge_channel->write_format, ast_channel_writeformat(bridge_channel->chan));
@@ -1826,6 +1827,7 @@ void bridge_channel_internal_join(struct ast_bridge_channel *bridge_channel)
if (bridge_channel_internal_push(bridge_channel)) {
ast_bridge_channel_leave_bridge(bridge_channel, BRIDGE_CHANNEL_STATE_END_NO_DISSOLVE);
+ res = -1;
}
bridge_reconfigured(bridge_channel->bridge, 1);
@@ -1881,6 +1883,8 @@ void bridge_channel_internal_join(struct ast_bridge_channel *bridge_channel)
ast_channel_unlock(bridge_channel->chan);
ast_bridge_channel_restore_formats(bridge_channel);
+
+ return res;
}
int bridge_channel_internal_queue_blind_transfer(struct ast_channel *transferee,