Adapting ipcd code to new ipc.cr bindings.

master
Philippe PITTOLI 2019-12-29 16:09:57 +01:00
parent 73ca696aef
commit 2f3ece0739
2 changed files with 5 additions and 5 deletions

View File

@ -92,8 +92,8 @@ class IPC::NetworkD < IPC::Service
# Then we provide the file descriptor to the client
r = LibIPC.ipc_provide_fd(origin.fd, service.fd)
if r != 0
m = String.new LibIPC.ipc_errors_get (r)
if r.error_code != 0
m = String.new r.error_message
raise Exception.new "cannot send the file descriptor of the requested service: #{m}"
end
@ -120,8 +120,8 @@ class IPC::NetworkD < IPC::Service
# TODO: plumberd should be able to transfer messages???
r = LibIPC.ipc_wait_event self.pointer, @service_info.pointer, pointerof(event), pointerof(@timer)
if r != 0
m = String.new LibIPC.ipc_errors_get (r)
if r.error_code != 0
m = String.new r.error_message
yield IPC::Exception.new "error waiting for a new event: #{m}"
end