From a9bdc01e19ee5896706634ca5e633d136b81f60f Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Sun, 29 Oct 2006 18:50:25 +0100 Subject: [PATCH] wininet: Store pointer to WININETHTTPSESSIONW in WININETHTTPREQUESTW. --- dlls/wininet/http.c | 5 +++++ dlls/wininet/internet.h | 1 + 2 files changed, 6 insertions(+) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 2d396086c65..cfbda27b0d9 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -1009,6 +1009,9 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs, lpwhr->hdr.destroy = HTTP_CloseHTTPRequestHandle; lpwhr->hdr.lpfnStatusCB = lpwhs->hdr.lpfnStatusCB; + WININET_AddRef( &lpwhs->hdr ); + lpwhr->lpHttpSession = lpwhs; + handle = WININET_AllocHandle( &lpwhr->hdr ); if (NULL == handle) { @@ -2938,6 +2941,8 @@ static void HTTP_CloseHTTPRequestHandle(LPWININETHANDLEHEADER hdr) TRACE("\n"); + WININET_Release(&lpwhr->hdr); + if (NETCON_connected(&lpwhr->netConnection)) HTTP_CloseConnection(lpwhr); diff --git a/dlls/wininet/internet.h b/dlls/wininet/internet.h index 9c4e7d241ef..de53717fa9c 100644 --- a/dlls/wininet/internet.h +++ b/dlls/wininet/internet.h @@ -190,6 +190,7 @@ typedef struct typedef struct { WININETHANDLEHEADER hdr; + WININETHTTPSESSIONW *lpHttpSession; LPWSTR lpszPath; LPWSTR lpszVerb; LPWSTR lpszRawHeaders;