aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_local.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-10-23 12:19:47 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-10-23 12:19:47 +0000
commitd3403a17ea03efc1df307fd0f4a90414b311b5dc (patch)
tree43e47efe6f89f32ec12ee1d4588a8315ce8a3fe3 /channels/chan_local.c
parent6ee0e0d925c21a2691bee34e5f960cdc8fc54594 (diff)
First pass at making transfer work within agent (not tested, shouldn't break anything that currently worked)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4061 f38db490-d61c-443f-a65b-d21fe96a405b
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 9d004b5ed..fa879d59d 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 && p->chan->bridge && p->owner) {
+ if (isoutbound && p->chan && ast_bridged_channel(p->chan) && 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(&p->chan->bridge->lock)) {
+ if (!ast_mutex_trylock(&(ast_bridged_channel(p->chan))->lock)) {
if (!ast_mutex_trylock(&p->owner->lock)) {
- ast_channel_masquerade(p->owner, p->chan->bridge);
+ ast_channel_masquerade(p->owner, ast_bridged_channel(p->chan));
p->alreadymasqed = 1;
ast_mutex_unlock(&p->owner->lock);
}
- ast_mutex_unlock(&p->chan->bridge->lock);
+ ast_mutex_unlock(&(ast_bridged_channel(p->chan)->lock));
}
- } else if (!isoutbound && p->owner && p->owner->bridge && p->chan) {
+ } else if (!isoutbound && p->owner && ast_bridged_channel(p->owner) && p->chan) {
/* Masquerade bridged channel into chan */
- if (!ast_mutex_trylock(&p->owner->bridge->lock)) {
+ if (!ast_mutex_trylock(&(ast_bridged_channel(p->owner)->lock))) {
if (!ast_mutex_trylock(&p->chan->lock)) {
- ast_channel_masquerade(p->chan, p->owner->bridge);
+ ast_channel_masquerade(p->chan, ast_bridged_channel(p->owner));
p->alreadymasqed = 1;
ast_mutex_unlock(&p->chan->lock);
}
- ast_mutex_unlock(&p->owner->bridge->lock);
+ ast_mutex_unlock(&(ast_bridged_channel(p->owner)->lock));
}
}
}