From 0174146eb468888ac27bc5ae78b7a20dcd06f565 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Mon, 18 Apr 2016 21:53:07 +0200 Subject: only send switch status update if parsing was a succes diff --git a/src/rhctl/audio_switch.go b/src/rhctl/audio_switch.go index 0f89ee7..8c698b4 100644 --- a/src/rhctl/audio_switch.go +++ b/src/rhctl/audio_switch.go @@ -150,6 +150,7 @@ func (sw *AudioSwitch) updateStateGPI(data string) { sw.state.GPI[in] = true default: rhl.Printf("Audioswitch: invalid gpi status update (state must be either '1' or '0' but is '%s')", data[7:8]) + return } sw.StateChanges <- sw.state return -- cgit v0.10.2