Commit 0929593b authored by Dan Hipschman's avatar Dan Hipschman Committed by Alexandre Julliard

wininet: InternetReadFileExA should check INTERNET_FLAG_ASYNC.

parent aaecdf79
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment