Module: wine Branch: master Commit: 6dfa25d0cd1258f08d2162e5abbdef4a66f0a8c3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=6dfa25d0cd1258f08d2162e5ab...
Author: Piotr Caban piotr@codeweavers.com Date: Thu Mar 15 12:08:05 2012 +0100
urlmon: Stop binding when OnDataAvailable fails.
---
dlls/urlmon/binding.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c index 159dca4..58aed20 100644 --- a/dlls/urlmon/binding.c +++ b/dlls/urlmon/binding.c @@ -1095,8 +1095,19 @@ static void report_data(Binding *This, DWORD bscf, ULONG progress, ULONG progres formatetc.tymed = stgmed.tymed; formatetc.cfFormat = This->clipboard_format;
- IBindStatusCallback_OnDataAvailable(This->callback, bscf, progress, + hres = IBindStatusCallback_OnDataAvailable(This->callback, bscf, progress, &formatetc, &stgmed); + if(hres != S_OK) { + if(This->download_state != END_DOWNLOAD) { + This->download_state = END_DOWNLOAD; + IBindStatusCallback_OnProgress(This->callback, progress, progress_max, + BINDSTATUS_ENDDOWNLOADDATA, This->url); + } + + WARN("OnDataAvailable returned %x\n", hres); + stop_binding(This, hres, NULL); + return; + }
if(This->download_state == END_DOWNLOAD) stop_binding(This, S_OK, NULL);