diff options
Diffstat (limited to 'zaptel.c')
-rwxr-xr-x | zaptel.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -2576,6 +2576,15 @@ void zt_alarm_notify(struct zt_span *span) span->lastalarms = span->alarms; for (x=0;x < span->channels;x++) zt_qevent_lock(&span->chans[x], j); + /* Switch to other master if current master in alarm */ + for (x=1; x<maxspans; x++) { + if (spans[x] && !spans[x]->alarms) { + if(master != spans[x]) + printk("Zaptel: Master changed to %s\n", spans[x]->name); + master = spans[x]; + break; + } + } } } |