[asterisk-commits] rmudgett: branch rmudgett/ect r256269 - in /team/rmudgett/ect: ./ channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Apr 5 20:13:15 CDT 2010


Author: rmudgett
Date: Mon Apr  5 20:13:13 2010
New Revision: 256269

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=256269
Log:
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
  ........
................

Modified:
    team/rmudgett/ect/   (props changed)
    team/rmudgett/ect/channels/chan_dahdi.c

Propchange: team/rmudgett/ect/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/rmudgett/ect/
------------------------------------------------------------------------------
--- ect-integrated (original)
+++ ect-integrated Mon Apr  5 20:13:13 2010
@@ -1,1 +1,1 @@
-/trunk:1-256197
+/trunk:1-256268

Modified: team/rmudgett/ect/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/ect/channels/chan_dahdi.c?view=diff&rev=256269&r1=256268&r2=256269
==============================================================================
--- team/rmudgett/ect/channels/chan_dahdi.c (original)
+++ team/rmudgett/ect/channels/chan_dahdi.c Mon Apr  5 20:13:13 2010
@@ -6666,25 +6666,31 @@
 		}
 
 #ifdef PRI_2BCT
-		switch (p0->sig) {
-		case SIG_PRI_LIB_HANDLE_CASES:
-			q931c0 = ((struct sig_pri_chan *) (p0->sig_pvt))->call;
-			break;
-		default:
-			q931c0 = NULL;
-			break;
-		}
-		switch (p1->sig) {
-		case SIG_PRI_LIB_HANDLE_CASES:
-			q931c1 = ((struct sig_pri_chan *) (p1->sig_pvt))->call;
-			break;
-		default:
-			q931c1 = NULL;
-			break;
-		}
-		if (q931c0 && q931c1 && p0->pri->transfer && p1->pri->transfer && !triedtopribridge) {
+		if (!triedtopribridge) {
 			triedtopribridge = 1;
-			pri_channel_bridge(q931c0, q931c1);
+			if (p0->pri && p0->pri == p1->pri && p0->pri->transfer) {
+				ast_mutex_lock(&p0->pri->lock);
+				switch (p0->sig) {
+				case SIG_PRI_LIB_HANDLE_CASES:
+					q931c0 = ((struct sig_pri_chan *) (p0->sig_pvt))->call;
+					break;
+				default:
+					q931c0 = NULL;
+					break;
+				}
+				switch (p1->sig) {
+				case SIG_PRI_LIB_HANDLE_CASES:
+					q931c1 = ((struct sig_pri_chan *) (p1->sig_pvt))->call;
+					break;
+				default:
+					q931c1 = NULL;
+					break;
+				}
+				if (q931c0 && q931c1) {
+					pri_channel_bridge(q931c0, q931c1);
+				}
+				ast_mutex_unlock(&p0->pri->lock);
+			}
 		}
 #endif
 




More information about the asterisk-commits mailing list