Obsolete
/
ipcd
Archived
3
0
Fork 0

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

View File

@ -97,7 +97,7 @@ class InstanceStorage
# 6. removing the client and the service from is_client
@is_client = @is_client.select do |fd,v| fd != fdclient end
@is_json = @is_json.select do |fd,v| fd != fdclient end
@fd_to_websocket.select! do |fd, ws|
fd != fdclient
end