summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
}