as per the Open Group Specification, MSG_TRUNC should be set in flags whenever the packet is truncated

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20583 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Hugo Santos 2007-04-05 16:09:06 +00:00
parent abe1ec18ac
commit 485a82e613

View File

@ -823,14 +823,11 @@ socket_receive(net_socket *socket, msghdr *header, void *data, size_t length,
gNetBufferModule.free(buffer);
if (bytesCopied < bytesReceived) {
if (flags & MSG_TRUNC) {
if (header)
header->msg_flags = MSG_TRUNC;
if (header)
header->msg_flags = MSG_TRUNC;
if (flags & MSG_TRUNC)
return bytesReceived;
}
return ENOBUFS;
}
return bytesCopied;