summaryrefslogtreecommitdiff
path: root/src/rhctl/switch_control.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/rhctl/switch_control.go')
-rw-r--r--src/rhctl/switch_control.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/rhctl/switch_control.go b/src/rhctl/switch_control.go
index cd66161..1cfd4f8 100644
--- a/src/rhctl/switch_control.go
+++ b/src/rhctl/switch_control.go
@@ -148,30 +148,30 @@ func handleServer(sin <-chan ServerState, sout chan<- ServerState, cin <-chan Co
}
func (ctrl *SwitchControl) checkMissingOrStaleStates(maxAge time.Duration) (isStale bool) {
- if time.Since(ctrl.state.Switch.AudioInputsChanged) > maxAge {
+ if time.Since(ctrl.state.Switch.AudioInputsUpdated) > maxAge {
ctrl.sw.Commands <- &SwitchCommand{SwitchCmdStateAudio, nil, nil}
isStale = true
}
- if time.Since(ctrl.state.Switch.AudioSilenceChanged) > maxAge {
+ if time.Since(ctrl.state.Switch.AudioSilenceUpdated) > maxAge {
ctrl.sw.Commands <- &SwitchCommand{SwitchCmdStateSilence, nil, nil}
isStale = true
}
- if time.Since(ctrl.state.Switch.GPIChanged) > maxAge {
+ if time.Since(ctrl.state.Switch.GPIUpdated) > maxAge {
ctrl.sw.Commands <- &SwitchCommand{SwitchCmdStateGPIAll, nil, nil}
isStale = true
}
- if time.Since(ctrl.state.Switch.RelayChanged) > maxAge {
+ if time.Since(ctrl.state.Switch.RelayUpdated) > maxAge {
ctrl.sw.Commands <- &SwitchCommand{SwitchCmdStateRelay, nil, nil}
isStale = true
}
- if time.Since(ctrl.state.Switch.OCChanged) > maxAge {
+ if time.Since(ctrl.state.Switch.OCUpdated) > maxAge {
ctrl.sw.Commands <- &SwitchCommand{SwitchCmdStateOC, nil, nil}
isStale = true
}
for _, server := range ctrl.servers {
s, exists := ctrl.state.Server[server.name]
- if !exists || time.Since(s.Changed) > maxAge {
+ if !exists || time.Since(s.Updated) > maxAge {
server.UpdateRequest <- true
isStale = true
}