Commit Graph

5 Commits

Author SHA1 Message Date
David van Moolenbroek
18fe603509 UDS: sendmsg/recvmsg fixes
- sendmsg: the accumulation of multiple in-flight file descriptors was
  already described in the comments; now the code actually does what
  the comments say :) -- also, added robustness in case of a failure;
- recvmsg: only create a socket rights message if there are file
  descriptors pending at all;
- recvmsg: copy back the control message length;
- recvmsg: use CMSG_SPACE instead of CMSG_LEN to compute sizes.

Not sure if all of this is now working according to specification,
but at least tmux seems to be happy with it.

Change-Id: I8d076c14c3ff3220b7fea730e0f08f4b4254ede5
2013-10-09 23:20:57 +02:00
David van Moolenbroek
3cca4cd220 UDS: add support for FIONREAD
Change-Id: I50030012b408242a86f8c55017429acdadff49d1
2013-10-09 23:20:22 +02:00
David van Moolenbroek
e75b8e5c01 UDS: support for nonblocking sockets
This patch includes several other fixes, which are now tested in the
test56 test set.

Change-Id: I9535d5a6c072abf966252838522c5f65b353c6c2
2013-10-09 23:19:27 +02:00
David van Moolenbroek
91826d3307 UDS: clean up source code
- move VFS calls to a separate source file;
- solve a few subtle bugs, mostly in error handling;
- simplify debug reporting code;
- make a few definitions more independent;
- restyle to something closer to KNF.

Change-Id: I7b0537adfccac8b92b5cc3e78dac9f5ce3c79f03
2013-10-09 23:19:11 +02:00
David van Moolenbroek
244072e59f UDS: split off from PFS
Change-Id: I769cbd64aa6e5e85a797caf0f8bbb4c20e145263
2013-10-09 23:19:02 +02:00