Add MSG_WAITALL to recvmsg of sessiond-comm
authorDavid Goulet <dgoulet@efficios.com>
Tue, 24 Jan 2012 15:17:30 +0000 (10:17 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Tue, 24 Jan 2012 15:17:30 +0000 (10:17 -0500)
Get the complete message on receive. We do not handle receiving split
data with the lttcomm_recv_unix_sock which is *not* good but for now we
will simply add this flag since every call should block anyway and does
not require any other funky flags.

This issue was detected with the kernel events listing failing by
sending half of the data half the time.

Reported-by: Daniel Thibault <daniel.thibault@drdc-rddc.gc.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/common/sessiond-comm/sessiond-comm.c

index 3b7a2a2ad827c11428f542c94d3334d96109b758..591e9629ab260810957eea43355d7dd8b654ad2a 100644 (file)
@@ -258,7 +258,7 @@ ssize_t lttcomm_recv_unix_sock(int sock, void *buf, size_t len)
        msg.msg_iov = iov;
        msg.msg_iovlen = 1;
 
-       ret = recvmsg(sock, &msg, 0);
+       ret = recvmsg(sock, &msg, MSG_WAITALL);
        if (ret < 0) {
                perror("recvmsg");
        }
This page took 0.024916 seconds and 4 git commands to generate.