From 8266852eb71adbd61c13655dd1afdf6bffe2da6c Mon Sep 17 00:00:00 2001 From: David Goulet Date: Tue, 24 Jan 2012 10:17:30 -0500 Subject: [PATCH] Add MSG_WAITALL to recvmsg of sessiond-comm 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 Signed-off-by: David Goulet --- src/common/sessiond-comm/sessiond-comm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/sessiond-comm/sessiond-comm.c b/src/common/sessiond-comm/sessiond-comm.c index 3b7a2a2ad..591e9629a 100644 --- a/src/common/sessiond-comm/sessiond-comm.c +++ b/src/common/sessiond-comm/sessiond-comm.c @@ -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"); } -- 2.34.1