1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-11 09:50:12 +00:00

Don't return -1 and abort if msg.msg_controllen is 0. For

some strange reason recvmsg() never sets errno to EAGAIN
on a non-blocking socket and just returns 0.

Reviewed by:	jhb
Approved by:	re
This commit is contained in:
Martin Blapp 2003-05-29 22:06:06 +00:00
parent 07a38a786a
commit 65d06145a2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=115394

View File

@ -779,8 +779,7 @@ __msgread_withcred(sock, buf, cnt, cmp)
bcopy(&cm.cmsg, &cmp->cmsg, sizeof(cmp->cmsg));
bcopy(CMSG_DATA(&cm), &cmp->cmcred, sizeof(cmp->cmcred));
if (msg.msg_controllen == 0 ||
(msg.msg_flags & MSG_CTRUNC) != 0)
if ((msg.msg_flags & MSG_CTRUNC) != 0)
return (-1);
return (ret);