summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rhctl/main.go6
-rw-r--r--src/rhctl/telnet.go4
2 files changed, 7 insertions, 3 deletions
diff --git a/src/rhctl/main.go b/src/rhctl/main.go
index b0b57e6..2302e6b 100644
--- a/src/rhctl/main.go
+++ b/src/rhctl/main.go
@@ -103,7 +103,11 @@ func main() {
ctrl := SwitchControlInit(conf, sw, servers)
// initializing non-essential parts, like control-interfaces aka clients
- telnet := TelnetInit(conf, ctrl)
+ telnet, err := TelnetInit(conf, ctrl)
+ if err != nil {
+ rhl.Printf("Error: failed to initialize telnet interface: %v", err)
+ return
+ }
web := WebInit(conf, ctrl)
//**************************************************
diff --git a/src/rhctl/telnet.go b/src/rhctl/telnet.go
index 9a84bd8..a73ecf7 100644
--- a/src/rhctl/telnet.go
+++ b/src/rhctl/telnet.go
@@ -290,7 +290,7 @@ func (telnet *TelnetInterface) Run() {
}
}
-func TelnetInit(conf *Config, ctrl *SwitchControl) (telnet *TelnetInterface) {
+func TelnetInit(conf *Config, ctrl *SwitchControl) (telnet *TelnetInterface, err error) {
telnet = &TelnetInterface{}
cmdlist := make(telgo.CmdList)
@@ -301,7 +301,7 @@ func TelnetInit(conf *Config, ctrl *SwitchControl) (telnet *TelnetInterface) {
cmdlist["help"] = telnetHelp
cmdlist["quit"] = telnetQuit
- telnet.server = telgo.NewServer(conf.Clients.Telnet.Address, "rhctl> ", cmdlist, nil)
+ telnet.server, err = telgo.NewServer(conf.Clients.Telnet.Address, "rhctl> ", cmdlist, nil)
return
}