From 0929593b6c96a9dd482919b56f0a39d3ed015cb0 Mon Sep 17 00:00:00 2001 From: Dan Hipschman Date: Thu, 27 Mar 2008 13:52:24 -0700 Subject: [PATCH] wininet: InternetReadFileExA should check INTERNET_FLAG_ASYNC. --- dlls/wininet/http.c | 4 +--- dlls/wininet/tests/http.c | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index fc458d464f3..3980e9a1f22 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -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); diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index fb561c4e3a8..5d42077a42a 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -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);