[asterisk-commits] rmudgett: branch rmudgett/bch_shift_v1.4 r311927 - in /team/rmudgett/bch_shif...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 30 17:43:52 CDT 2011


Author: rmudgett
Date: Wed Mar 30 17:43:47 2011
New Revision: 311927

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=311927
Log:
Merged revisions 311926 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/team/rmudgett/bch_shift_v1.6.2

........
  r311926 | rmudgett | 2011-03-30 17:41:34 -0500 (Wed, 30 Mar 2011) | 1 line
  
  Protect release of channel when no PRI call present.
........

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

Propchange: team/rmudgett/bch_shift_v1.4/
------------------------------------------------------------------------------
--- bch_shift_v1.6.2-integrated (original)
+++ bch_shift_v1.6.2-integrated Wed Mar 30 17:43:47 2011
@@ -1,1 +1,1 @@
-/team/rmudgett/bch_shift_v1.6.2:1-311797
+/team/rmudgett/bch_shift_v1.6.2:1-311926

Modified: team/rmudgett/bch_shift_v1.4/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/bch_shift_v1.4/channels/chan_dahdi.c?view=diff&rev=311927&r1=311926&r2=311927
==============================================================================
--- team/rmudgett/bch_shift_v1.4/channels/chan_dahdi.c (original)
+++ team/rmudgett/bch_shift_v1.4/channels/chan_dahdi.c Wed Mar 30 17:43:47 2011
@@ -3137,8 +3137,8 @@
 #endif
 
 			/* Make sure we have a call (or REALLY have a call in the case of a PRI) */
+			pri_grab(p, p->pri);
 			if (p->call && (!p->bearer || (p->bearer->call == p->call))) {
-				pri_grab(p, p->pri);
 				if (p->alreadyhungup) {
 					ast_log(LOG_DEBUG, "Already hungup...  Calling hangup once, and clearing call\n");
 
@@ -3168,17 +3168,15 @@
 					}
 					pri_hangup(p->pri->pri, p->call, icause);
 				}
-				p->allocated = 0;
-				p->owner = NULL;
-				pri_rel(p->pri);
 			} else {
 				if (p->bearer)
 					ast_log(LOG_DEBUG, "Bearer call is %p, while ours is still %p\n", p->bearer->call, p->call);
 				p->call = NULL;
-				p->allocated = 0;
-				p->owner = NULL;
-				res = 0;
-			}
+			}
+			p->allocated = 0;
+			p->owner = NULL;
+			pri_rel(p->pri);
+			res = 0;
 		} else
 #endif	/* defined(HAVE_PRI) */
 		{




More information about the asterisk-commits mailing list