summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2016-03-27 19:25:13 (GMT)
committerChristian Pointner <equinox@spreadspace.org>2016-03-27 19:32:34 (GMT)
commit6d2348f42b3e63109795c2d9578705d06b387cbb (patch)
treee10aee84ffff66af6e1cec51d1128df76efe56cc /src
parentfef133ba130d6d78b58ce0b42b351b06e89d6a82 (diff)
pass switch updates through to server
Diffstat (limited to 'src')
-rw-r--r--src/rhctl/playout_server.go4
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)