Fixed regression in send/revc calls in the gamedata fetcher

This commit is contained in:
Matt Woodrow 2008-10-20 18:42:22 +13:00
parent 7b8cd751e1
commit 918bec36d9

View File

@ -548,7 +548,7 @@ int FetcherThread::RecvData( int socketDescriptor, char *buffer, int len )
/* Is there a limit on how much we can receive? Some site said 1024 bytes, which will be well short of a file */
if (FD_ISSET(socketDescriptor, &fds))
{
bytesReceived = recv(socketDescriptor, buffer, len, 0);
bytesReceived = recv(socketDescriptor, buffer+bytesReceivedTotal, len-bytesReceivedTotal, 0);
}
if (bytesReceived == 0 || bytesReceived == -1)
@ -583,7 +583,7 @@ int FetcherThread::SendData( int socketDescriptor, char *buffer, int len )
if (FD_ISSET(socketDescriptor, &fds))
{
sentBytes = send(socketDescriptor, buffer, len, 0);
sentBytes = send(socketDescriptor, buffer+sentBytesTotal, len-sentBytesTotal, 0);
}
if (sentBytes == 0 || sentBytes == -1)