From 46cad71e4bc2e3a7b0e8b0c4c13eb826b171acdc Mon Sep 17 00:00:00 2001 From: Karchnu Date: Fri, 10 Jul 2020 14:58:41 +0200 Subject: [PATCH] fixes --- src/ipc/lowlevel.cr | 6 ++++-- src/ipc/message.cr | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ipc/lowlevel.cr b/src/ipc/lowlevel.cr index d9681cd..28b6376 100644 --- a/src/ipc/lowlevel.cr +++ b/src/ipc/lowlevel.cr @@ -131,6 +131,7 @@ lib LibIPC Closing # Error # ParsingError # + Ignore # end # Changing the callbacks for switched fd. @@ -138,9 +139,10 @@ lib LibIPC # , enum ipccb cb_in (fd, *ipc_message) # , enum ipccb cb_out (fd, *ipc_message) fun ipc_switching_callbacks(Ctx*, LibC::Int, - cb_in : (LibC::Int, Pointer(LibIPC::Message)) -> LibIPC::IPCCB, - cb_out : (LibC::Int, Pointer(LibIPC::Message)) -> LibIPC::IPCCB) : IPCError + (LibC::Int, LibIPC::Message* -> LibIPC::IPCCB), + (LibC::Int, LibIPC::Message* -> LibIPC::IPCCB)) + fun ipc_ctx_switching_add (ctx : Ctx*, fd1 : LibC::Int, fd2 : LibC::Int) # Void fun ipc_switching_add (switch : Switchings*, fd1 : LibC::Int, fd2 : LibC::Int) # Void fun ipc_switching_del (switch : Switchings*, fd : LibC::Int ) : LibC::Int fun ipc_switching_get (switch : Switchings*, fd : LibC::Int ) : LibC::Int diff --git a/src/ipc/message.cr b/src/ipc/message.cr index 1b1ca55..74d67b8 100644 --- a/src/ipc/message.cr +++ b/src/ipc/message.cr @@ -23,7 +23,7 @@ class IPC::Message def self.from_json (str : String) jsonmessage = JSONMessage.from_json str - IPC::Message.new jsonmessage.mtype, jsonmessage.utype, jsonmessage.payload + IPC::Message.new 0, jsonmessage.mtype, jsonmessage.utype, jsonmessage.payload end def to_json