BnetEndPoint::Send() should use BytesRemaining() as the amount of data to be sent, not

Size(). This fixes #4724.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33437 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Bruno G. Albuquerque
2009-10-05 10:31:47 +00:00
parent 8a71915a9d
commit b69dfc85c8
+2 -2
View File
@@ -555,7 +555,7 @@ BNetEndpoint::Send(const void* buffer, size_t length, int flags)
int32
BNetEndpoint::Send(BNetBuffer& buffer, int flags)
{
return Send(buffer.Data(), buffer.Size(), flags);
return Send(buffer.Data(), buffer.BytesRemaining(), flags);
}
@@ -583,7 +583,7 @@ int32
BNetEndpoint::SendTo(BNetBuffer& buffer,
const BNetAddress& address, int flags)
{
return SendTo(buffer.Data(), buffer.Size(), address, flags);
return SendTo(buffer.Data(), buffer.BytesRemaining(), address, flags);
}