Rob Shearman : wininet: Don' t send callbacks in HTTP_CloseConnection if not connected.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Jan 4 15:09:29 CST 2007


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

Author: Rob Shearman <rob at codeweavers.com>
Date:   Thu Jan  4 18:21:42 2007 +0000

wininet: Don't send callbacks in HTTP_CloseConnection if not connected.

---

 dlls/wininet/http.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index d7e1d33..7fa0566 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -2925,16 +2925,16 @@ static VOID HTTP_CloseConnection(LPWININ
 
     TRACE("%p\n",lpwhr);
 
+    if (!NETCON_connected(&lpwhr->netConnection))
+        return;
+
     lpwhs = lpwhr->lpHttpSession;
     hIC = lpwhs->lpAppInfo;
 
     INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
                           INTERNET_STATUS_CLOSING_CONNECTION, 0, 0);
 
-    if (NETCON_connected(&lpwhr->netConnection))
-    {
-        NETCON_close(&lpwhr->netConnection);
-    }
+    NETCON_close(&lpwhr->netConnection);
 
     INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
                           INTERNET_STATUS_CONNECTION_CLOSED, 0, 0);
@@ -2956,8 +2956,7 @@ static void HTTP_CloseHTTPRequestHandle(
 
     WININET_Release(&lpwhr->hdr);
 
-    if (NETCON_connected(&lpwhr->netConnection))
-        HTTP_CloseConnection(lpwhr);
+    HTTP_CloseConnection(lpwhr);
 
     HeapFree(GetProcessHeap(), 0, lpwhr->lpszPath);
     HeapFree(GetProcessHeap(), 0, lpwhr->lpszVerb);




More information about the wine-cvs mailing list