mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
wininet: Use lpHttpSession instead of lpwhcalback where possible.
This commit is contained in:
parent
a9bdc01e19
commit
61a1cef6f6
@ -68,7 +68,7 @@ static BOOL WININET_GetProxyServer( HINTERNET hRequest, LPWSTR szBuf, DWORD sz )
|
|||||||
if (NULL == lpwhr)
|
if (NULL == lpwhr)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
lpwhs = (LPWININETHTTPSESSIONW) lpwhr->hdr.lpwhparent;
|
lpwhs = lpwhr->lpHttpSession;
|
||||||
if (NULL == lpwhs)
|
if (NULL == lpwhs)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
@ -209,7 +209,7 @@ static BOOL WININET_SetProxyAuthorization( HINTERNET hRequest,
|
|||||||
if( !lpwhr )
|
if( !lpwhr )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
lpwhs = (LPWININETHTTPSESSIONW) lpwhr->hdr.lpwhparent;
|
lpwhs = lpwhr->lpHttpSession;
|
||||||
if (NULL == lpwhs || lpwhs->hdr.htype != WH_HHTTPSESSION)
|
if (NULL == lpwhs || lpwhs->hdr.htype != WH_HHTTPSESSION)
|
||||||
{
|
{
|
||||||
INTERNET_SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE);
|
INTERNET_SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE);
|
||||||
|
@ -372,7 +372,7 @@ static void HTTP_ProcessHeaders( LPWININETHTTPREQW lpwhr )
|
|||||||
|
|
||||||
static void HTTP_AddProxyInfo( LPWININETHTTPREQW lpwhr )
|
static void HTTP_AddProxyInfo( LPWININETHTTPREQW lpwhr )
|
||||||
{
|
{
|
||||||
LPWININETHTTPSESSIONW lpwhs = (LPWININETHTTPSESSIONW)lpwhr->hdr.lpwhparent;
|
LPWININETHTTPSESSIONW lpwhs = lpwhr->lpHttpSession;
|
||||||
LPWININETAPPINFOW hIC = lpwhs->lpAppInfo;
|
LPWININETAPPINFOW hIC = lpwhs->lpAppInfo;
|
||||||
|
|
||||||
assert(lpwhs->hdr.htype == WH_HHTTPSESSION);
|
assert(lpwhs->hdr.htype == WH_HHTTPSESSION);
|
||||||
@ -1761,7 +1761,7 @@ BOOL WINAPI HttpSendRequestExW(HINTERNET hRequest,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
lpwhs = (LPWININETHTTPSESSIONW) lpwhr->hdr.lpwhparent;
|
lpwhs = lpwhr->lpHttpSession;
|
||||||
assert(lpwhs->hdr.htype == WH_HHTTPSESSION);
|
assert(lpwhs->hdr.htype == WH_HHTTPSESSION);
|
||||||
hIC = lpwhs->lpAppInfo;
|
hIC = lpwhs->lpAppInfo;
|
||||||
assert(hIC->hdr.htype == WH_HINIT);
|
assert(hIC->hdr.htype == WH_HINIT);
|
||||||
@ -1845,7 +1845,7 @@ BOOL WINAPI HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders,
|
|||||||
goto lend;
|
goto lend;
|
||||||
}
|
}
|
||||||
|
|
||||||
lpwhs = (LPWININETHTTPSESSIONW) lpwhr->hdr.lpwhparent;
|
lpwhs = lpwhr->lpHttpSession;
|
||||||
if (NULL == lpwhs || lpwhs->hdr.htype != WH_HHTTPSESSION)
|
if (NULL == lpwhs || lpwhs->hdr.htype != WH_HHTTPSESSION)
|
||||||
{
|
{
|
||||||
INTERNET_SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE);
|
INTERNET_SetLastError(ERROR_INTERNET_INCORRECT_HANDLE_TYPE);
|
||||||
@ -1932,7 +1932,7 @@ static BOOL HTTP_HandleRedirect(LPWININETHTTPREQW lpwhr, LPCWSTR lpszUrl, LPCWST
|
|||||||
DWORD dwHeaderLength, LPVOID lpOptional, DWORD dwOptionalLength,
|
DWORD dwHeaderLength, LPVOID lpOptional, DWORD dwOptionalLength,
|
||||||
DWORD dwContentLength)
|
DWORD dwContentLength)
|
||||||
{
|
{
|
||||||
LPWININETHTTPSESSIONW lpwhs = (LPWININETHTTPSESSIONW) lpwhr->hdr.lpwhparent;
|
LPWININETHTTPSESSIONW lpwhs = lpwhr->lpHttpSession;
|
||||||
LPWININETAPPINFOW hIC = lpwhs->lpAppInfo;
|
LPWININETAPPINFOW hIC = lpwhs->lpAppInfo;
|
||||||
WCHAR path[2048];
|
WCHAR path[2048];
|
||||||
char szaddr[32];
|
char szaddr[32];
|
||||||
@ -2174,7 +2174,7 @@ static BOOL HTTP_SecureProxyConnect(LPWININETHTTPREQW lpwhr)
|
|||||||
BOOL ret;
|
BOOL ret;
|
||||||
static const WCHAR szConnect[] = {'C','O','N','N','E','C','T',0};
|
static const WCHAR szConnect[] = {'C','O','N','N','E','C','T',0};
|
||||||
static const WCHAR szFormat[] = {'%','s',':','%','d',0};
|
static const WCHAR szFormat[] = {'%','s',':','%','d',0};
|
||||||
LPWININETHTTPSESSIONW lpwhs = (LPWININETHTTPSESSIONW)lpwhr->hdr.lpwhparent;
|
LPWININETHTTPSESSIONW lpwhs = lpwhr->lpHttpSession;
|
||||||
|
|
||||||
TRACE("\n");
|
TRACE("\n");
|
||||||
|
|
||||||
@ -2485,7 +2485,7 @@ static BOOL HTTP_OpenConnection(LPWININETHTTPREQW lpwhr)
|
|||||||
goto lend;
|
goto lend;
|
||||||
}
|
}
|
||||||
|
|
||||||
lpwhs = (LPWININETHTTPSESSIONW)lpwhr->hdr.lpwhparent;
|
lpwhs = lpwhr->lpHttpSession;
|
||||||
|
|
||||||
hIC = lpwhs->lpAppInfo;
|
hIC = lpwhs->lpAppInfo;
|
||||||
inet_ntop(lpwhs->socketAddress.sin_family, &lpwhs->socketAddress.sin_addr,
|
inet_ntop(lpwhs->socketAddress.sin_family, &lpwhs->socketAddress.sin_addr,
|
||||||
@ -2912,7 +2912,7 @@ static VOID HTTP_CloseConnection(LPWININETHTTPREQW lpwhr)
|
|||||||
|
|
||||||
TRACE("%p\n",lpwhr);
|
TRACE("%p\n",lpwhr);
|
||||||
|
|
||||||
lpwhs = (LPWININETHTTPSESSIONW) lpwhr->hdr.lpwhparent;
|
lpwhs = lpwhr->lpHttpSession;
|
||||||
hIC = lpwhs->lpAppInfo;
|
hIC = lpwhs->lpAppInfo;
|
||||||
|
|
||||||
INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
|
INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext,
|
||||||
|
Loading…
Reference in New Issue
Block a user