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:
mbr 2003-05-29 22:06:06 +00:00
parent 32ad52fb86
commit cbe33ed314

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);