summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-04-01 13:55:27 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-04-01 13:55:27 (GMT)
commitdf49dff4c6f96d1c2e032cc93e7b6bdb57f11833 (patch)
tree81950673916bfa235caf83e82cb8b8cc380a33ff /src
parentee832bac958585259ac26f59be23b0c7aed26a94 (diff)
some cleanups
Diffstat (limited to 'src')
-rw-r--r--src/rhctl/audio_switch_command.go5
-rw-r--r--src/rhctl/main.go2
-rw-r--r--src/rhctl/playout_server.go4
3 files changed, 6 insertions, 5 deletions
diff --git a/src/rhctl/audio_switch_command.go b/src/rhctl/audio_switch_command.go
index df357a6..d3aef7e 100644
--- a/src/rhctl/audio_switch_command.go
+++ b/src/rhctl/audio_switch_command.go
@@ -206,14 +206,15 @@ func SwitchCommandParseAudio(args []string) (cmdstr SwitchCmdString, cmdargs []i
return
}
- var onum SwitchOutputNum
+ onum := SwitchOutputNum(0)
if args[0] != "all" {
if err = onum.FromString(args[0]); err != nil {
return
}
cmdargs = append(cmdargs, onum)
}
- var inum SwitchInputNum
+
+ inum := SwitchInputNum(0)
if len(args) == 3 {
if err = inum.FromString(args[2]); err != nil {
return
diff --git a/src/rhctl/main.go b/src/rhctl/main.go
index 923a287..2d5b8c9 100644
--- a/src/rhctl/main.go
+++ b/src/rhctl/main.go
@@ -102,7 +102,7 @@ func main() {
ctrl := SwitchControlInit(conf, sw, servers)
- // running non-essential parts aka clients
+ // initializing non-essential parts aka clients
telnet := TelnetInit(conf, ctrl)
//**************************************************
diff --git a/src/rhctl/playout_server.go b/src/rhctl/playout_server.go
index 9f8b9d1..adba52d 100644
--- a/src/rhctl/playout_server.go
+++ b/src/rhctl/playout_server.go
@@ -82,8 +82,8 @@ func (srv *PlayoutServer) handleControl(data string) {
func (srv *PlayoutServer) handleHeartbeat(data string) {
rhdl.Printf("Server(%s): got heartbeat message: %q", srv.name, data)
srv.hbtimer.Reset(srv.hbtimeout)
- srv.hbcnt++
- if srv.hbcnt < srv.hbthreshold {
+ if (srv.hbcnt + 1) < srv.hbthreshold {
+ srv.hbcnt++
return
}