summaryrefslogtreecommitdiff
path: root/wct4xxp.c
diff options
context:
space:
mode:
Diffstat (limited to 'wct4xxp.c')
-rwxr-xr-xwct4xxp.c7
1 files changed, 5 insertions, 2 deletions
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]);