[asterisk-commits] rmudgett: branch 1.4 r256225 - /branches/1.4/channels/chan_dahdi.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Apr 5 19:10:18 CDT 2010
Author: rmudgett
Date: Mon Apr 5 19:10:16 2010
New Revision: 256225
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=256225
Log:
DAHDI/PRI call to pri_channel_bridge() not protected by PRI lock.
SWP-1231
ABE-2163
Modified:
branches/1.4/channels/chan_dahdi.c
Modified: branches/1.4/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/channels/chan_dahdi.c?view=diff&rev=256225&r1=256224&r2=256225
==============================================================================
--- branches/1.4/channels/chan_dahdi.c (original)
+++ branches/1.4/channels/chan_dahdi.c Mon Apr 5 19:10:16 2010
@@ -3561,7 +3561,6 @@
#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.
@@ -3777,13 +3776,15 @@
}
#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
More information about the asterisk-commits
mailing list