summaryrefslogtreecommitdiff
path: root/channels/chan_local.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2005-02-14 23:20:01 +0000
committerMark Spencer <markster@digium.com>2005-02-14 23:20:01 +0000
commitcea4a8e09eff22f54e5070402eb76947a8e24e9e (patch)
treecc26b9024433e54e3e7ed0d6cc4ab38ad9707539 /channels/chan_local.c
parent90267ab0ead82aa339099e31bca947769eeb7250 (diff)
Fix native agent transfer, add UPGRADE.txt for notes about backwards compatibility issues upgrading from Asterisk 1.0 to current CVS head
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5031 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_local.c')
-rwxr-xr-xchannels/chan_local.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c
index b1998f1c8..e6ee96450 100755
--- a/channels/chan_local.c
+++ b/channels/chan_local.c
@@ -139,28 +139,28 @@ static void check_bridge(struct local_pvt *p, int isoutbound)
{
if (p->alreadymasqed || p->nooptimization)
return;
- if (isoutbound && p->chan && ast_bridged_channel(p->chan) && p->owner) {
+ if (isoutbound && p->chan && p->chan->_bridge /* Not ast_bridged_channel! Only go one step! */ && p->owner) {
/* Masquerade bridged channel into owner */
/* Lock everything we need, one by one, and give up if
we can't get everything. Remember, we'll get another
chance in just a little bit */
- if (!ast_mutex_trylock(&(ast_bridged_channel(p->chan))->lock)) {
+ if (!ast_mutex_trylock(&(p->chan->_bridge)->lock)) {
if (!ast_mutex_trylock(&p->owner->lock)) {
- ast_channel_masquerade(p->owner, ast_bridged_channel(p->chan));
+ ast_channel_masquerade(p->owner, p->chan->_bridge);
p->alreadymasqed = 1;
ast_mutex_unlock(&p->owner->lock);
}
- ast_mutex_unlock(&(ast_bridged_channel(p->chan)->lock));
+ ast_mutex_unlock(&(p->chan->_bridge)->lock);
}
- } else if (!isoutbound && p->owner && ast_bridged_channel(p->owner) && p->chan) {
+ } else if (!isoutbound && p->owner && p->owner->_bridge && p->chan) {
/* Masquerade bridged channel into chan */
- if (!ast_mutex_trylock(&(ast_bridged_channel(p->owner)->lock))) {
+ if (!ast_mutex_trylock(&(p->owner->_bridge)->lock)) {
if (!ast_mutex_trylock(&p->chan->lock)) {
- ast_channel_masquerade(p->chan, ast_bridged_channel(p->owner));
+ ast_channel_masquerade(p->chan, p->owner->_bridge);
p->alreadymasqed = 1;
ast_mutex_unlock(&p->chan->lock);
}
- ast_mutex_unlock(&(ast_bridged_channel(p->owner)->lock));
+ ast_mutex_unlock(&(p->owner->_bridge)->lock);
}
}
}