Commit 51e1a088 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

inetcomm: Return S_FALSE if no data is returned in IInternetProtocol::Read.

parent a8cfe2ee
......@@ -564,10 +564,18 @@ static HRESULT WINAPI MimeHtmlProtocol_Resume(IInternetProtocol *iface)
static HRESULT WINAPI MimeHtmlProtocol_Read(IInternetProtocol *iface, void* pv, ULONG cb, ULONG* pcbRead)
{
MimeHtmlProtocol *This = impl_from_IInternetProtocol(iface);
ULONG read = 0;
HRESULT hres;
TRACE("(%p)->(%p %u %p)\n", This, pv, cb, pcbRead);
return IStream_Read(This->stream, pv, cb, pcbRead);
hres = IStream_Read(This->stream, pv, cb, &read);
if(pcbRead)
*pcbRead = read;
if(hres != S_OK)
return hres;
return read ? S_OK : S_FALSE;
}
static HRESULT WINAPI MimeHtmlProtocol_Seek(IInternetProtocol *iface, LARGE_INTEGER dlibMove,
......
......@@ -1368,6 +1368,8 @@ static HRESULT WINAPI ProtocolSink_ReportData(IInternetProtocolSink *iface, DWOR
buf[read] = 0;
ok(!strcmp(buf, current_binding_test->data), "unexpected data: %s\n", buf);
hres = IInternetProtocol_Read(current_binding_protocol, buf, sizeof(buf), &read);
ok(hres == S_FALSE, "Read failed: %08x\n", hres);
return S_OK;
}
......
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