Jacek Caban : wininet: Use lpAppInfo instead of lpwhparent where possible.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Oct 30 05:22:25 CST 2006


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Sun Oct 29 18:49:39 2006 +0100

wininet: Use lpAppInfo instead of lpwhparent where possible.

---

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

diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index e56ea4e..2d39608 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -373,7 +373,7 @@ static void HTTP_ProcessHeaders( LPWININ
 static void HTTP_AddProxyInfo( LPWININETHTTPREQW lpwhr )
 {
     LPWININETHTTPSESSIONW lpwhs = (LPWININETHTTPSESSIONW)lpwhr->hdr.lpwhparent;
-    LPWININETAPPINFOW hIC = (LPWININETAPPINFOW)lpwhs->hdr.lpwhparent;
+    LPWININETAPPINFOW hIC = lpwhs->lpAppInfo;
 
     assert(lpwhs->hdr.htype == WH_HHTTPSESSION);
     assert(hIC->hdr.htype == WH_HINIT);
@@ -993,7 +993,7 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(L
     TRACE("-->\n");
 
     assert( lpwhs->hdr.htype == WH_HHTTPSESSION );
-    hIC = (LPWININETAPPINFOW) lpwhs->hdr.lpwhparent;
+    hIC = lpwhs->lpAppInfo;
 
     lpwhr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WININETHTTPREQW));
     if (NULL == lpwhr)
@@ -1760,7 +1760,7 @@ BOOL WINAPI HttpSendRequestExW(HINTERNET
 
     lpwhs = (LPWININETHTTPSESSIONW) lpwhr->hdr.lpwhparent;
     assert(lpwhs->hdr.htype == WH_HHTTPSESSION);
-    hIC = (LPWININETAPPINFOW) lpwhs->hdr.lpwhparent;
+    hIC = lpwhs->lpAppInfo;
     assert(hIC->hdr.htype == WH_HINIT);
 
     if (hIC->hdr.dwFlags & INTERNET_FLAG_ASYNC)
@@ -1850,7 +1850,7 @@ BOOL WINAPI HttpSendRequestW(HINTERNET h
         goto lend;
     }
 
-    hIC = (LPWININETAPPINFOW) lpwhs->hdr.lpwhparent;
+    hIC = lpwhs->lpAppInfo;
     if (NULL == hIC ||  hIC->hdr.htype != WH_HINIT)
     {
         INTERNET_SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE);
@@ -1930,7 +1930,7 @@ static BOOL HTTP_HandleRedirect(LPWININE
                                 DWORD dwContentLength)
 {
     LPWININETHTTPSESSIONW lpwhs = (LPWININETHTTPSESSIONW) lpwhr->hdr.lpwhparent;
-    LPWININETAPPINFOW hIC = (LPWININETAPPINFOW) lpwhs->hdr.lpwhparent;
+    LPWININETAPPINFOW hIC = lpwhs->lpAppInfo;
     WCHAR path[2048];
     char szaddr[32];
 
@@ -2484,7 +2484,7 @@ static BOOL HTTP_OpenConnection(LPWININE
 
     lpwhs = (LPWININETHTTPSESSIONW)lpwhr->hdr.lpwhparent;
 
-    hIC = (LPWININETAPPINFOW) lpwhs->hdr.lpwhparent;
+    hIC = lpwhs->lpAppInfo;
     inet_ntop(lpwhs->socketAddress.sin_family, &lpwhs->socketAddress.sin_addr,
               szaddr, sizeof(szaddr));
     INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
@@ -2910,7 +2910,7 @@ static VOID HTTP_CloseConnection(LPWININ
     TRACE("%p\n",lpwhr);
 
     lpwhs = (LPWININETHTTPSESSIONW) lpwhr->hdr.lpwhparent;
-    hIC = (LPWININETAPPINFOW) lpwhs->hdr.lpwhparent;
+    hIC = lpwhs->lpAppInfo;
 
     INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
                           INTERNET_STATUS_CLOSING_CONNECTION, 0, 0);




More information about the wine-cvs mailing list