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:
parent
abe1ec18ac
commit
485a82e613
@ -823,16 +823,13 @@ 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 (flags & MSG_TRUNC)
|
||||
return bytesReceived;
|
||||
}
|
||||
|
||||
return ENOBUFS;
|
||||
}
|
||||
|
||||
return bytesCopied;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user