urlmon: Stop binding when OnDataAvailable fails.

This commit is contained in:
Piotr Caban 2012-03-15 12:08:05 +01:00 committed by Alexandre Julliard
parent 5ca254f703
commit 6dfa25d0cd
1 changed files with 12 additions and 1 deletions

View File

@ -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);