Make sure InternetReadFile returns full buffers.

This commit is contained in:
Krzysztof Foltman 2004-09-08 21:46:33 +00:00 committed by Alexandre Julliard
parent 7c89759e88
commit 80cfdd353d

View File

@ -1646,7 +1646,7 @@ BOOL WINAPI InternetReadFile(HINTERNET hFile, LPVOID lpBuffer,
nSocket = ((LPWININETFILE)lpwh)->nDataSocket; nSocket = ((LPWININETFILE)lpwh)->nDataSocket;
if (nSocket != -1) if (nSocket != -1)
{ {
int res = recv(nSocket, lpBuffer, dwNumOfBytesToRead, 0); int res = recv(nSocket, lpBuffer, dwNumOfBytesToRead, MSG_WAITALL);
retval = (res >= 0); retval = (res >= 0);
*dwNumOfBytesRead = retval ? res : 0; *dwNumOfBytesRead = retval ? res : 0;
} }