From c5123006b1646a06d708190d2740f944a998644a Mon Sep 17 00:00:00 2001 From: markster Date: Fri, 2 Apr 2004 17:21:44 +0000 Subject: Don't consider yellow alarm in selecting timing sources git-svn-id: http://svn.digium.com/svn/zaptel/trunk@340 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- wct4xxp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'wct4xxp.c') diff --git a/wct4xxp.c b/wct4xxp.c index c2d0fc7..791935f 100755 --- a/wct4xxp.c +++ b/wct4xxp.c @@ -1299,8 +1299,11 @@ static void __t4_check_alarms(struct t4 *wc, int span) alarms |= ZT_ALARM_LOOPBACK; wc->spans[span].alarms = alarms; - /* Re-check the timing source when we enter alarm */ - if (!oldalarms && alarms) + /* Re-check the timing source when we enter/leave alarm, not withstanding + yellow alarm */ + oldalarms &= ~ZT_ALARM_YELLOW; + alarms &= ~ZT_ALARM_YELLOW; + if ((!oldalarms && alarms) || (oldalarms && !alarms)) t4_set_timing_source_auto(wc); zt_alarm_notify(&wc->spans[span]); -- cgit v1.2.3