diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-12-06 22:15:09 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-12-06 22:15:09 (GMT) |
commit | 940d34b97d60f0ea5aa3525e63eba02db4243ff5 (patch) | |
tree | db3974e0ee9ab137af9c2b03116e7fe5d039f08d /src/rhctl | |
parent | b2a8e6da5ef1dbdaa06d52fd9e8d83772504d16d (diff) |
incoporated telgo changes
Diffstat (limited to 'src/rhctl')
-rw-r--r-- | src/rhctl/main.go | 6 | ||||
-rw-r--r-- | src/rhctl/telnet.go | 4 |
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 } |