diff options
-rw-r--r-- | src/rhctl/playout_server.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rhctl/playout_server.go b/src/rhctl/playout_server.go index bc31019..1f38f42 100644 --- a/src/rhctl/playout_server.go +++ b/src/rhctl/playout_server.go @@ -60,6 +60,7 @@ type PlayoutServer struct { status ServerStatus Updates chan ServerStatus UpdateRequest chan bool + SwitchUpdates chan SwitchUpdate } func (srv *PlayoutServer) handleControl(data string) { @@ -127,6 +128,8 @@ func (srv *PlayoutServer) Run() { } else { srv.control.tx <- "channel ?" } + case update := <-srv.SwitchUpdates: + srv.control.tx <- update.Data } } } @@ -146,6 +149,7 @@ func ServerInit(name string, conf *Config) (srv *PlayoutServer, err error) { srv.status.Channel = "" srv.Updates = make(chan ServerStatus, 8) srv.UpdateRequest = make(chan bool, 8) + srv.SwitchUpdates = make(chan SwitchUpdate, 32) if srv.control, err = SerialOpen(conf.Servers[name].ControlDevice, conf.Servers[name].ControlBaudrate, "\n"); err != nil { err = fmt.Errorf("Server(%s): error opening control port: %s", srv.name, err) |