[Asterisk-cvs] zaptel wct4xxp.c,1.38,1.39
markster at lists.digium.com
markster at lists.digium.com
Thu Apr 15 18:20:50 CDT 2004
Update of /usr/cvsroot/zaptel
In directory mongoose.digium.com:/tmp/cvs-serv2927
Modified Files:
wct4xxp.c
Log Message:
Debounce red alarm to prevent red alarm oscillation
Index: wct4xxp.c
===================================================================
RCS file: /usr/cvsroot/zaptel/wct4xxp.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- wct4xxp.c 10 Apr 2004 07:00:25 -0000 1.38
+++ wct4xxp.c 15 Apr 2004 22:23:43 -0000 1.39
@@ -90,6 +90,7 @@
int syncs[4]; /* sync sources */
int psyncs[4]; /* span-relative sync sources */
int alarmtimer[4]; /* Alarm timer */
+ int redalarms[4];
int blinktimer;
#ifdef FANCY_ALARM
int alarmpos;
@@ -1265,8 +1266,13 @@
alarms |= ZT_ALARM_NOTOPEN;
}
- if (c & 0xa0)
- alarms |= ZT_ALARM_RED;
+ if (c & 0xa0) {
+ if (wc->redalarms[span] > 10)
+ alarms |= ZT_ALARM_RED;
+ else
+ wc->redalarms[span]++;
+ } else
+ wc->redalarms[span] = 0;
if (c & 0x4)
alarms |= ZT_ALARM_BLUE;
/* Keep track of recovering */
More information about the svn-commits
mailing list