From d2ff760197cbbc8d8a0467eecc82271d88fc09d1 Mon Sep 17 00:00:00 2001 From: dma Date: Sun, 10 Sep 2017 15:34:00 +0000 Subject: [PATCH] Patch up IPC --- sgfw/ipc.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sgfw/ipc.go b/sgfw/ipc.go index 9286130..296c28f 100644 --- a/sgfw/ipc.go +++ b/sgfw/ipc.go @@ -102,6 +102,8 @@ func ReceiverLoop(fw *Firewall, c net.Conn) { data := string(buf) + log.Notice("Received incoming IPC:",data) + if data[len(data)-1] == '\n' { data = data[0:len(data)-1] } @@ -176,13 +178,15 @@ func ReceiverLoop(fw *Firewall, c net.Conn) { sboxid, err := strconv.Atoi(tokens[3]) if err != nil { log.Notice("IPC received invalid oz sbox number: ",tokens[3]) + log.Notice("Data: %v", data) c.Write([]byte("Bad command: sandbox id was invalid")) return } // ozname := strings.Join(tokens[2:], " ") + log.Notice("IPC message for register-init OK.") addInitPid(initpid, tokens[2], sboxid) - c.Write([]byte("OK.\n")) + c.Write([]byte("OK")) return } else if tokens[0] == "unregister-init" && len(tokens) == 2 { initp := tokens[1]