Jacek Caban : urlmon: Read remaining protocol data if report_data was called after binding finished .
Alexandre Julliard
julliard at winehq.org
Tue Feb 15 11:29:28 CST 2011
Module: wine
Branch: master
Commit: 4499b4516ecf02475930eb6c20b678c79df03e65
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4499b4516ecf02475930eb6c20b678c79df03e65
Author: Jacek Caban <jacek at codeweavers.com>
Date: Tue Feb 15 17:01:44 2011 +0100
urlmon: Read remaining protocol data if report_data was called after binding finished.
---
dlls/urlmon/binding.c | 7 ++++++-
dlls/urlmon/tests/url.c | 5 +++++
2 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c
index d617052..67848b8 100644
--- a/dlls/urlmon/binding.c
+++ b/dlls/urlmon/binding.c
@@ -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)
diff --git a/dlls/urlmon/tests/url.c b/dlls/urlmon/tests/url.c
index 21d5fd6..4469949 100644
--- a/dlls/urlmon/tests/url.c
+++ b/dlls/urlmon/tests/url.c
@@ -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);
More information about the wine-cvs
mailing list