From fbf2f6904c7f8f06cb46bc9a4e8462c95b42119d Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Tue, 24 Sep 2013 22:54:55 +0000 Subject: [PATCH] chan buffer and --bug --- go/door_daemon_zmq/handle_commands.go | 2 +- go/door_daemon_zmq/serial_tty.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/go/door_daemon_zmq/handle_commands.go b/go/door_daemon_zmq/handle_commands.go index 1595561..0cfee8d 100644 --- a/go/door_daemon_zmq/handle_commands.go +++ b/go/door_daemon_zmq/handle_commands.go @@ -15,7 +15,7 @@ var cmdToDoorCmdHandler = map[string]DoorCmdHandler { "open": DoorCmdHandler{ checkCmdDoorControl, "o"}, "close": DoorCmdHandler{ checkCmdDoorControl, "c"}, "toggle": DoorCmdHandler{ checkCmdDoorControl, "t"}, - "status": DoorCmdHandler{ checkCmdDoorControl, "s"}, + "status": DoorCmdHandler{ checkCmdStatus, "s"}, } // ---------- Command Handling Code ------------- diff --git a/go/door_daemon_zmq/serial_tty.go b/go/door_daemon_zmq/serial_tty.go index 89f0b0c..ea246ca 100644 --- a/go/door_daemon_zmq/serial_tty.go +++ b/go/door_daemon_zmq/serial_tty.go @@ -51,7 +51,7 @@ func OpenAndHandleSerial(filename string) (chan string, chan [][]byte, error) { if err != nil { return nil, nil, err } - wr := make(chan string) + wr := make(chan string, 1) rd := make(chan [][]byte, 20) go serialWriter(wr, serial) go serialReader(rd, serial) -- 1.7.10.4