[asterisk-commits] mjordan: tag 10.0.0-rc2 r345368 - in /tags/10.0.0-rc2: ./ apps/ channels/ main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Nov 15 09:24:34 CST 2011
Author: mjordan
Date: Tue Nov 15 09:24:31 2011
New Revision: 345368
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=345368
Log:
Merge of blockers from 10 to rc2
Modified:
tags/10.0.0-rc2/ (props changed)
tags/10.0.0-rc2/apps/app_macro.c
tags/10.0.0-rc2/channels/chan_sip.c
tags/10.0.0-rc2/main/bridging.c
Propchange: tags/10.0.0-rc2/
------------------------------------------------------------------------------
svn:mergeinfo = /branches/10:344493,344557,345064
Modified: tags/10.0.0-rc2/apps/app_macro.c
URL: http://svnview.digium.com/svn/asterisk/tags/10.0.0-rc2/apps/app_macro.c?view=diff&rev=345368&r1=345367&r2=345368
==============================================================================
--- tags/10.0.0-rc2/apps/app_macro.c (original)
+++ tags/10.0.0-rc2/apps/app_macro.c Tue Nov 15 09:24:31 2011
@@ -28,7 +28,7 @@
/*** MODULEINFO
<support_level>core</support_level>
<replacement>app_stack (GoSub)</replacement>
- */
+ ***/
#include "asterisk.h"
Modified: tags/10.0.0-rc2/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/tags/10.0.0-rc2/channels/chan_sip.c?view=diff&rev=345368&r1=345367&r2=345368
==============================================================================
--- tags/10.0.0-rc2/channels/chan_sip.c (original)
+++ tags/10.0.0-rc2/channels/chan_sip.c Tue Nov 15 09:24:31 2011
@@ -25865,11 +25865,13 @@
/* Called with peerl lock, but releases it */
struct sip_pvt *p;
int newmsgs = 0, oldmsgs = 0;
- const char *vmexten;
+ const char *vmexten = NULL;
ao2_lock(peer);
- vmexten = ast_strdupa(peer->vmexten);
+ if (peer->vmexten) {
+ vmexten = ast_strdupa(peer->vmexten);
+ }
if (ast_test_flag((&peer->flags[1]), SIP_PAGE2_SUBSCRIBEMWIONLY) && !peer->mwipvt) {
ao2_unlock(peer);
Modified: tags/10.0.0-rc2/main/bridging.c
URL: http://svnview.digium.com/svn/asterisk/tags/10.0.0-rc2/main/bridging.c?view=diff&rev=345368&r1=345367&r2=345368
==============================================================================
--- tags/10.0.0-rc2/main/bridging.c (original)
+++ tags/10.0.0-rc2/main/bridging.c Tue Nov 15 09:24:31 2011
@@ -739,12 +739,13 @@
ao2_unlock(bridge_channel->bridge);
+ ao2_lock(bridge_channel);
/* Wait for data to either come from the channel or us to be signalled */
if (!bridge_channel->suspended) {
+ ao2_unlock(bridge_channel);
ast_debug(10, "Going into a multithreaded waitfor for bridge channel %p of bridge %p\n", bridge_channel, bridge_channel->bridge);
chan = ast_waitfor_nandfds(&bridge_channel->chan, 1, fds, nfds, NULL, &outfd, &ms);
} else {
- ao2_lock(bridge_channel);
ast_debug(10, "Going into a multithreaded signal wait for bridge channel %p of bridge %p\n", bridge_channel, bridge_channel->bridge);
ast_cond_wait(&bridge_channel->cond, ao2_object_get_lockaddr(bridge_channel));
ao2_unlock(bridge_channel);
@@ -777,9 +778,10 @@
/*! \brief Internal function that suspends a channel from a bridge */
static void bridge_channel_suspend(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
{
+ ao2_lock(bridge_channel);
bridge_channel->suspended = 1;
-
bridge_array_remove(bridge, bridge_channel->chan);
+ ao2_unlock(bridge_channel);
if (bridge->technology->suspend) {
bridge->technology->suspend(bridge, bridge_channel);
@@ -791,13 +793,17 @@
/*! \brief Internal function that unsuspends a channel from a bridge */
static void bridge_channel_unsuspend(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
{
- bridge_channel->suspended =0;
-
+ ao2_lock(bridge_channel);
+ bridge_channel->suspended = 0;
bridge_array_add(bridge, bridge_channel->chan);
+ ast_cond_signal(&bridge_channel->cond);
+ ao2_unlock(bridge_channel);
if (bridge->technology->unsuspend) {
bridge->technology->unsuspend(bridge, bridge_channel);
}
+
+
return;
}
@@ -865,6 +871,12 @@
/* If a hook was actually matched execute it on this channel, otherwise stream up the DTMF to the other channels */
if (hook) {
hook->callback(bridge, bridge_channel, hook->hook_pvt);
+ /* If we are handing the channel off to an external hook for ownership,
+ * we are not guaranteed what kind of state it will come back in. If
+ * the channel hungup, we need to detect that here. */
+ if (bridge_channel->chan && ast_check_hangup_locked(bridge_channel->chan)) {
+ ast_bridge_change_state(bridge_channel, AST_BRIDGE_CHANNEL_STATE_END);
+ }
} else {
ast_bridge_dtmf_stream(bridge, dtmf, bridge_channel->chan);
}
More information about the asterisk-commits
mailing list