summaryrefslogtreecommitdiff
path: root/cmd/dolmetschctld/dolmetschctld.go
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2019-02-09 20:10:49 +0100
committerChristian Pointner <equinox@spreadspace.org>2019-02-09 20:10:49 +0100
commitab64923443ea365f175ca48528f4fc1815c2e105 (patch)
tree11f4e89d89f16854b8abc2b1321c420abd14b945 /cmd/dolmetschctld/dolmetschctld.go
parentadded basic state machine (diff)
added telnet control interface
Diffstat (limited to 'cmd/dolmetschctld/dolmetschctld.go')
-rw-r--r--cmd/dolmetschctld/dolmetschctld.go11
1 files changed, 10 insertions, 1 deletions
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.")
}