Commit Graph

14 Commits

Author SHA1 Message Date
David Vossel
b327dbec73 Low: ipc_socket: Fixes fd leak in socket ipc client disconnection 2013-09-16 18:38:20 -05:00
Michael van der Westhuizen
57e630f63f Use sizeof to get the correct size of the sockaddr_un sun_path member in a portable way. Fixes corosync on Mac OS X. 2013-09-03 08:44:15 +02:00
David Vossel
2a0a0790e9 Low: ipc_socket: Output send event failure as debug instead of error 2013-07-23 22:37:08 -05:00
David Vossel
54ef796126 High: ipc_socket.c: Detect EOF connection on connection STREAM socket 2013-07-23 20:01:41 -05:00
David Vossel
e6c99f6280 Merge pull request #81 from davidvossel/dgram_max_msg
Added ability to estimate kernel's actual max dgram buffer size in a portable way.
2013-07-22 14:04:52 -07:00
David Vossel
a881c14086 Low: ipc_socket.c: Handle the unlikely event of an EAGAIN or EINTR during dgram max size detection 2013-07-22 20:29:24 -05:00
David Vossel
c04e887cf1 fixes double close 2013-07-22 16:58:46 -05:00
David Vossel
f14be872a1 Fixes double close 2013-07-22 16:57:47 -05:00
David Vossel
65d044be18 High: ipcc: Add abilty to verify dgram kernel buffer size meets max msg value 2013-07-19 18:51:59 -05:00
David Vossel
6a1186863f Low: ipc_socket: In fbsd send() returns ENOBUFS when dgram queue is full, this should be treated similar to EAGAIN 2013-07-12 19:04:47 -05:00
David Vossel
95e48fdb76 Fix: ipcs: Properly disconnect client connection on POLLNVAL or any other error causing connection removal from mainloop.
qb_ipcs_dispatch_connection_request is a callback function registered with
mainloop, or whatever other looping thread implementation is in use.  When
this callback is registered, a reference of the connection object is given
to the mainloop thread.  If this callback ever returns something none zero
the callback (and corresponding fd) is unregistered from the loop automatically,
so we must decrement the reference in this instance.

Since unregistering this callback from mainloop guarantees a disconnect
simply because requests on the fd are no longer processed, it is best
that we completely disconnect the connection (which will handle the unref)
when this callback returns an error... Otherwise since the fd is unregistered
from the mainloop thread, it may not be possible to detect a disconnect
in the future.
2013-07-01 18:46:31 -05:00
Angus Salkeld
75a550d8d3 IPC: fix call to QB_SUN_LEN
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-03-12 20:45:47 +11:00
Angus Salkeld
31d9f0900d Use dgram sockets for message oriented communications
This is to prevent partial sends and gettting stuck in
retry loops.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-02-18 20:51:33 +11:00
Angus Salkeld
9d2eca251b IPC: seperate ipc_us.c into 2 files
Seperate into a setup file and a socket backend file, it was getting messy
and confusing. Also preparing for using DGRAM sockets.

This should not result in any logical changes.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-02-06 11:21:05 +11:00