Misha Koshelev : urlmon: Don' t ignore bytes read from IInternetProtocol_Read if hres is not S_OK (e.g., E_PENDING).

Alexandre Julliard julliard at wine.codeweavers.com
Tue Jul 24 07:06:19 CDT 2007


Module: wine
Branch: master
Commit: 03ac3b5e95f68395ebc49fda5457a0e7941d40eb
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=03ac3b5e95f68395ebc49fda5457a0e7941d40eb

Author: Misha Koshelev <mk144210 at bcm.edu>
Date:   Mon Jul 23 20:30:17 2007 -0500

urlmon: Don't ignore bytes read from IInternetProtocol_Read if hres is not S_OK (e.g., E_PENDING).

Bytes can still be read with E_PENDING returned if the whole request could not be satisfied, don't
ignore those.

---

 dlls/urlmon/binding.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c
index cd82eb9..62cac80 100644
--- a/dlls/urlmon/binding.c
+++ b/dlls/urlmon/binding.c
@@ -146,10 +146,9 @@ static void fill_stream_buffer(ProtocolStream *This)
 
     This->hres = IInternetProtocol_Read(This->protocol, This->buf+This->buf_size,
             sizeof(This->buf)-This->buf_size, &read);
-    if(SUCCEEDED(This->hres)) {
-        This->buf_size += read;
+    This->buf_size += read;
+    if(read > 0)
         This->init_buf = TRUE;
-    }
 }
 
 static LRESULT WINAPI notif_wnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)




More information about the wine-cvs mailing list