inetcomm: Return S_FALSE if no data is returned in IInternetProtocol::Read.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a8cfe2eeb5
commit
51e1a08893
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue