[asterisk-commits] rmudgett: trunk r312950 - in /trunk: ./ channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Apr 5 13:47:15 CDT 2011


Author: rmudgett
Date: Tue Apr  5 13:47:11 2011
New Revision: 312950

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=312950
Log:
Merged revisions 312949 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r312949 | rmudgett | 2011-04-05 13:45:24 -0500 (Tue, 05 Apr 2011) | 6 lines
  
  Crash if ISDN span layer 1 is down on initial load.
  
  Regression from -r312575 B channel shifting during negotiation.
  
  * Also combine updating the alarm flag with clearing the resetting flag.
........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_dahdi.c
    trunk/channels/sig_pri.c
    trunk/channels/sig_pri.h

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: trunk/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_dahdi.c?view=diff&rev=312950&r1=312949&r2=312950
==============================================================================
--- trunk/channels/chan_dahdi.c (original)
+++ trunk/channels/chan_dahdi.c Tue Apr  5 13:47:11 2011
@@ -12757,9 +12757,7 @@
 				switch (tmp->sig) {
 #ifdef HAVE_PRI
 				case SIG_PRI_LIB_HANDLE_CASES:
-					ast_mutex_lock(&tmp->lock);
-					sig_pri_chan_alarm_notify(tmp->sig_pvt, si.alarms);
-					ast_mutex_unlock(&tmp->lock);
+					sig_pri_set_alarm(tmp->sig_pvt, !si.alarms);
 					break;
 #endif
 #if defined(HAVE_SS7)

Modified: trunk/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/sig_pri.c?view=diff&rev=312950&r1=312949&r2=312950
==============================================================================
--- trunk/channels/sig_pri.c (original)
+++ trunk/channels/sig_pri.c Tue Apr  5 13:47:11 2011
@@ -178,8 +178,15 @@
 	}
 }
 
-static void sig_pri_set_alarm(struct sig_pri_chan *p, int in_alarm)
-{
+void sig_pri_set_alarm(struct sig_pri_chan *p, int in_alarm)
+{
+	/*
+	 * Clear the channel restart flag when the channel alarm changes
+	 * to prevent the flag from getting stuck when the link goes
+	 * down.
+	 */
+	p->resetting = 0;
+
 	p->inalarm = in_alarm;
 	if (p->calls->set_alarm) {
 		p->calls->set_alarm(p->chan_pvt, in_alarm);
@@ -5555,7 +5562,6 @@
 				for (i = 0; i < pri->numchans; i++) {
 					if (pri->pvts[i]) {
 						sig_pri_set_alarm(pri->pvts[i], 0);
-						pri->pvts[i]->resetting = 0;
 					}
 				}
 				sig_pri_span_devstate_changed(pri);
@@ -5584,7 +5590,6 @@
 									p->owner->_softhangup |= AST_SOFTHANGUP_DEV;
 							}
 							sig_pri_set_alarm(p, 1);
-							p->resetting = 0;
 						}
 					}
 					sig_pri_span_devstate_changed(pri);
@@ -8488,7 +8493,6 @@
 void sig_pri_chan_alarm_notify(struct sig_pri_chan *p, int noalarm)
 {
 	pri_grab(p, p->pri);
-	p->resetting = 0;
 	sig_pri_set_alarm(p, !noalarm);
 	if (!noalarm) {
 		if (pri_get_timer(p->pri->pri, PRI_TIMER_T309) < 0) {

Modified: trunk/channels/sig_pri.h
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/sig_pri.h?view=diff&rev=312950&r1=312949&r2=312950
==============================================================================
--- trunk/channels/sig_pri.h (original)
+++ trunk/channels/sig_pri.h Tue Apr  5 13:47:11 2011
@@ -581,6 +581,7 @@
 void sig_pri_stop_pri(struct sig_pri_span *pri);
 int sig_pri_start_pri(struct sig_pri_span *pri);
 
+void sig_pri_set_alarm(struct sig_pri_chan *p, int in_alarm);
 void sig_pri_chan_alarm_notify(struct sig_pri_chan *p, int noalarm);
 
 void pri_event_alarm(struct sig_pri_span *pri, int index, int before_start_pri);




More information about the asterisk-commits mailing list