aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2010-04-06 00:46:14 +0000
committerrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2010-04-06 00:46:14 +0000
commit2c67d0d468815e0aeb35cb5d0ffd397be640a21c (patch)
treedba3bd67d59039457dfab52e8fd737b78d61e5b3
parent2883ed8b48771fa51656fab2f006e6b62d07b37e (diff)
Merged revisions 256265 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r256265 | rmudgett | 2010-04-05 19:39:44 -0500 (Mon, 05 Apr 2010) | 12 lines Merged revisions 256225 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r256225 | rmudgett | 2010-04-05 19:10:16 -0500 (Mon, 05 Apr 2010) | 5 lines DAHDI/PRI call to pri_channel_bridge() not protected by PRI lock. SWP-1231 ABE-2163 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@256266 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_dahdi.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index e5adb979b..4c9ea5cda 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -4146,7 +4146,6 @@ static enum ast_bridge_result dahdi_bridge(struct ast_channel *c0, struct ast_ch
#ifdef PRI_2BCT
int triedtopribridge = 0;
- q931_call *q931c0 = NULL, *q931c1 = NULL;
#endif
/* For now, don't attempt to native bridge if either channel needs DTMF detection.
@@ -4367,13 +4366,15 @@ static enum ast_bridge_result dahdi_bridge(struct ast_channel *c0, struct ast_ch
}
#ifdef PRI_2BCT
- q931c0 = p0->call;
- q931c1 = p1->call;
- if (p0->transfer && p1->transfer
- && q931c0 && q931c1
- && !triedtopribridge) {
- pri_channel_bridge(q931c0, q931c1);
+ if (!triedtopribridge) {
triedtopribridge = 1;
+ if (p0->pri && p0->pri == p1->pri && p0->transfer && p1->transfer) {
+ ast_mutex_lock(&p0->pri->lock);
+ if (p0->call && p1->call) {
+ pri_channel_bridge(p0->call, p1->call);
+ }
+ ast_mutex_unlock(&p0->pri->lock);
+ }
}
#endif