From: Bernhard Tittelbach Date: Tue, 24 Sep 2013 22:54:55 +0000 (+0000) Subject: chan buffer and --bug X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=fbf2f6904c7f8f06cb46bc9a4e8462c95b42119d;p=svn42.git chan buffer and --bug --- 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)