Commit 27b5c54f authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

urlmon: Better pending read handling.

parent 8b69bf72
......@@ -333,6 +333,7 @@ static HRESULT WINAPI ProtocolStream_Read(IStream *iface, void *pv,
{
ProtocolStream *This = STREAM_THIS(iface);
DWORD read = 0, pread = 0;
HRESULT hres;
TRACE("(%p)->(%p %ld %p)\n", This, pv, cb, pcbRead);
......@@ -354,9 +355,14 @@ static HRESULT WINAPI ProtocolStream_Read(IStream *iface, void *pv,
return S_OK;
}
IInternetProtocol_Read(This->protocol, (PBYTE)pv+read, cb-read, &pread);
hres = IInternetProtocol_Read(This->protocol, (PBYTE)pv+read, cb-read, &pread);
*pcbRead = read + pread;
if(hres == E_PENDING)
return E_PENDING;
else if(FAILED(hres))
FIXME("Read failed: %08lx\n", hres);
return read || pread ? S_OK : S_FALSE;
}
......
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