Piotr Caban : wininet: Fix reporting errors in callbacks.

Alexandre Julliard julliard at winehq.org
Mon Jul 19 11:05:31 CDT 2010


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

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Sat Jul 17 14:07:43 2010 +0200

wininet: Fix reporting errors in callbacks.

---

 dlls/wininet/http.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index 54895bb..fc6e351 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -3685,7 +3685,7 @@ lend:
             HTTP_ReceiveRequestData(lpwhr, TRUE);
         else
         {
-            iar.dwResult = 0;
+            iar.dwResult = (res==ERROR_SUCCESS ? (DWORD_PTR)lpwhr->hdr.hInternet : 0);
             iar.dwError = res;
 
             INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
@@ -3769,7 +3769,7 @@ static DWORD HTTP_HttpEndRequestW(http_request_t *lpwhr, DWORD dwFlags, DWORD_PT
         }
     }
 
-    iar.dwResult = (DWORD_PTR)lpwhr->hdr.hInternet;
+    iar.dwResult = (res==ERROR_SUCCESS ? (DWORD_PTR)lpwhr->hdr.hInternet : 0);
     iar.dwError = res;
 
     INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,




More information about the wine-cvs mailing list