wininet: InternetReadFileExA should check INTERNET_FLAG_ASYNC.

This commit is contained in:
Dan Hipschman 2008-03-27 13:52:24 -07:00 committed by Alexandre Julliard
parent aaecdf79bd
commit 0929593b6c
2 changed files with 3 additions and 3 deletions

View File

@ -1733,9 +1733,7 @@ static DWORD HTTPREQ_ReadFileExA(WININETHANDLEHEADER *hdr, INTERNET_BUFFERSA *bu
INTERNET_SendCallback(&req->hdr, req->hdr.dwContext, INTERNET_STATUS_RECEIVING_RESPONSE, NULL, 0);
/* FIXME: IRF_ASYNC may not be the right thing to test here;
* hIC->hdr.dwFlags & INTERNET_FLAG_ASYNC is probably better */
if (flags & IRF_ASYNC) {
if (hdr->dwFlags & INTERNET_FLAG_ASYNC) {
DWORD available = 0;
NETCON_query_data_available(&req->netConnection, &available);

View File

@ -659,6 +659,8 @@ static void InternetReadFileExA_test(int flags)
if (GetLastError() == ERROR_IO_PENDING)
{
trace("InternetReadFileEx -> PENDING\n");
ok(flags & INTERNET_FLAG_ASYNC,
"Should not get ERROR_IO_PENDING without INTERNET_FLAG_ASYNC\n");
CHECK_NOTIFIED(INTERNET_STATUS_RECEIVING_RESPONSE);
WaitForSingleObject(hCompleteEvent, INFINITE);
CHECK_NOTIFIED(INTERNET_STATUS_REQUEST_COMPLETE);