urlmon: Read remaining protocol data if report_data was called after binding finished.

This commit is contained in:
Jacek Caban 2011-02-15 17:01:44 +01:00 committed by Alexandre Julliard
parent 0d01f2f479
commit 4499b4516e
2 changed files with 11 additions and 1 deletions

View File

@ -1068,7 +1068,12 @@ static void report_data(Binding *This, DWORD bscf, ULONG progress, ULONG progres
TRACE("(%p)->(%d %u %u)\n", This, bscf, progress, progress_max);
if(This->download_state == END_DOWNLOAD || (This->state & (BINDING_STOPPED|BINDING_ABORTED)))
if(This->download_state == END_DOWNLOAD || (This->state & BINDING_ABORTED)) {
read_protocol_data(This->stgmed_buf);
return;
}
if(This->state & BINDING_STOPPED)
return;
if(This->stgmed_buf->file != INVALID_HANDLE_VALUE)

View File

@ -858,6 +858,11 @@ static HRESULT WINAPI Protocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_BEGINDOWNLOADDATA, NULL);
ok(hres == S_OK, "ReportProgress(BINDSTATUS_BEGINDOWNLOADDATA) failed: %08x\n", hres);
CHECK_CALLED(Read);
}else if(!bind_to_object && test_protocol == ABOUT_TEST) {
SET_EXPECT(Read);
hres = IInternetProtocolSink_ReportData(pOIProtSink, bscf, 13, 13);
ok(hres == S_OK, "ReportData failed: %08x\n", hres);
CHECK_CALLED(Read);
}
SET_EXPECT(Terminate);