Always return what we've got from the socket module (error or number of
bytes received), but not B_OK on success. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28337 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
3cead3c68e
commit
801e9bd9f1
@ -94,14 +94,13 @@ stack_interface_recvfrom(net_socket* socket, void* data, size_t length,
|
||||
message.msg_controllen = 0;
|
||||
message.msg_flags = 0;
|
||||
|
||||
status_t error = gNetSocketModule.receive(socket, &message, data, length,
|
||||
ssize_t received = gNetSocketModule.receive(socket, &message, data, length,
|
||||
flags);
|
||||
if (error < 0)
|
||||
return error;
|
||||
|
||||
if (_addressLength != NULL)
|
||||
if (received >= 0 && _addressLength != NULL)
|
||||
*_addressLength = message.msg_namelen;
|
||||
return B_OK;
|
||||
|
||||
return received;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user