From ab64923443ea365f175ca48528f4fc1815c2e105 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 9 Feb 2019 20:10:49 +0100 Subject: added telnet control interface --- cmd/dolmetschctld/dolmetschctld.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'cmd/dolmetschctld/dolmetschctld.go') diff --git a/cmd/dolmetschctld/dolmetschctld.go b/cmd/dolmetschctld/dolmetschctld.go index 783358d..0f6793b 100644 --- a/cmd/dolmetschctld/dolmetschctld.go +++ b/cmd/dolmetschctld/dolmetschctld.go @@ -51,11 +51,20 @@ func main() { var sm *StateMachine if sm, err = NewStateMachine(m); err != nil { - log.Printf("state machone successfully initialized!") + log.Printf("initializing state machine failed: %v", err) + os.Exit(1) } + log.Printf("state machine successfully initialized!") sm.Start() defer sm.Shutdown() + var telnet *TelnetInterface + if telnet, err = NewTelnetInterface(sm); err != nil { + log.Printf("creating telnet control interface failed: %v", err) + os.Exit(1) + } + telnet.Run() + log.Printf("exiting.") } -- cgit v1.2.3