From 6d2348f42b3e63109795c2d9578705d06b387cbb Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 27 Mar 2016 21:25:13 +0200 Subject: pass switch updates through to server 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) -- cgit v0.10.2