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