copy back the source address even when the data is truncated

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20586 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Hugo Santos 2007-04-05 17:56:09 +00:00
parent daad608a3a
commit a5e9026688

View File

@ -814,7 +814,7 @@ socket_receive(net_socket *socket, msghdr *header, void *data, size_t length,
bytesCopied += toRead;
}
if (bytesCopied == bytesReceived && header->msg_name != NULL) {
if (header->msg_name != NULL) {
header->msg_namelen = min_c(nameLen, buffer->source.ss_len);
memcpy(header->msg_name, &buffer->source, header->msg_namelen);
}