Commit 45459965 authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

wininet: Send INTERNET_STATUS_RESPONSE_RECEIVED notification in async handler.

parent e14f2c0b
......@@ -3134,6 +3134,13 @@ static void AsyncReadFileExProc(task_header_t *hdr)
TRACE("INTERNETREADFILEEXW %p\n", task->hdr.hdr);
res = HTTPREQ_Read(req, task->buf, task->size, task->ret_read);
if (res == ERROR_SUCCESS)
{
DWORD read = *task->ret_read;
INTERNET_SendCallback(&req->hdr, req->hdr.dwContext, INTERNET_STATUS_RESPONSE_RECEIVED,
&read, sizeof(read));
}
send_request_complete(req, res == ERROR_SUCCESS, res);
}
......
......@@ -1099,7 +1099,7 @@ static void InternetReadFileExA_test(int flags)
CHECK_NOTIFIED(INTERNET_STATUS_RECEIVING_RESPONSE);
WaitForSingleObject(hCompleteEvent, INFINITE);
CHECK_NOTIFIED(INTERNET_STATUS_REQUEST_COMPLETE);
CHECK_NOT_NOTIFIED(INTERNET_STATUS_RESPONSE_RECEIVED);
CHECK_NOTIFIED(INTERNET_STATUS_RESPONSE_RECEIVED);
ok(req_error == ERROR_SUCCESS, "req_error = %u\n", req_error);
}
else
......@@ -4505,6 +4505,7 @@ static void test_async_read(int port)
if (!ret)
{
ok( GetLastError() == ERROR_IO_PENDING, "expected ERROR_IO_PENDING, got %u\n", GetLastError() );
CHECK_NOTIFIED( INTERNET_STATUS_RECEIVING_RESPONSE );
SET_EXPECT( INTERNET_STATUS_REQUEST_COMPLETE );
if (!pending_reads++)
{
......@@ -4517,6 +4518,7 @@ static void test_async_read(int port)
ok( req_error == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", req_error );
todo_wine_if( pending_reads > 1 )
ok( ib.dwBufferLength != 0, "expected ib.dwBufferLength != 0\n" );
CHECK_NOTIFIED( INTERNET_STATUS_RESPONSE_RECEIVED );
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