winhttp: Make strings in WINHTTP_PROXY_INFO non-const.
This commit is contained in:
parent
24a690e90e
commit
1ba968821a
|
@ -2238,8 +2238,8 @@ static void free_request( struct winhttp_request *request )
|
|||
CloseHandle( request->thread );
|
||||
CloseHandle( request->wait );
|
||||
CloseHandle( request->cancel );
|
||||
heap_free( (WCHAR *)request->proxy.lpszProxy );
|
||||
heap_free( (WCHAR *)request->proxy.lpszProxyBypass );
|
||||
heap_free( request->proxy.lpszProxy );
|
||||
heap_free( request->proxy.lpszProxyBypass );
|
||||
heap_free( request->buffer );
|
||||
heap_free( request->verb );
|
||||
VariantClear( &request->data );
|
||||
|
@ -2430,16 +2430,16 @@ static HRESULT WINAPI winhttp_request_SetProxy(
|
|||
{
|
||||
case HTTPREQUEST_PROXYSETTING_DEFAULT:
|
||||
request->proxy.dwAccessType = WINHTTP_ACCESS_TYPE_DEFAULT_PROXY;
|
||||
heap_free( (WCHAR *)request->proxy.lpszProxy );
|
||||
heap_free( (WCHAR *)request->proxy.lpszProxyBypass );
|
||||
heap_free( request->proxy.lpszProxy );
|
||||
heap_free( request->proxy.lpszProxyBypass );
|
||||
request->proxy.lpszProxy = NULL;
|
||||
request->proxy.lpszProxyBypass = NULL;
|
||||
break;
|
||||
|
||||
case HTTPREQUEST_PROXYSETTING_DIRECT:
|
||||
request->proxy.dwAccessType = WINHTTP_ACCESS_TYPE_NO_PROXY;
|
||||
heap_free( (WCHAR *)request->proxy.lpszProxy );
|
||||
heap_free( (WCHAR *)request->proxy.lpszProxyBypass );
|
||||
heap_free( request->proxy.lpszProxy );
|
||||
heap_free( request->proxy.lpszProxyBypass );
|
||||
request->proxy.lpszProxy = NULL;
|
||||
request->proxy.lpszProxyBypass = NULL;
|
||||
break;
|
||||
|
@ -2448,12 +2448,12 @@ static HRESULT WINAPI winhttp_request_SetProxy(
|
|||
request->proxy.dwAccessType = WINHTTP_ACCESS_TYPE_NAMED_PROXY;
|
||||
if (V_VT( &proxy_server ) == VT_BSTR)
|
||||
{
|
||||
heap_free( (WCHAR *)request->proxy.lpszProxy );
|
||||
heap_free( request->proxy.lpszProxy );
|
||||
request->proxy.lpszProxy = strdupW( V_BSTR( &proxy_server ) );
|
||||
}
|
||||
if (V_VT( &bypass_list ) == VT_BSTR)
|
||||
{
|
||||
heap_free( (WCHAR *)request->proxy.lpszProxyBypass );
|
||||
heap_free( request->proxy.lpszProxyBypass );
|
||||
request->proxy.lpszProxyBypass = strdupW( V_BSTR( &bypass_list ) );
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -229,14 +229,14 @@ HINTERNET WINAPI WinHttpOpen( LPCWSTR agent, DWORD access, LPCWSTR proxy, LPCWST
|
|||
session->access = info.dwAccessType;
|
||||
if (info.lpszProxy && !(session->proxy_server = strdupW( info.lpszProxy )))
|
||||
{
|
||||
GlobalFree( (LPWSTR)info.lpszProxy );
|
||||
GlobalFree( (LPWSTR)info.lpszProxyBypass );
|
||||
GlobalFree( info.lpszProxy );
|
||||
GlobalFree( info.lpszProxyBypass );
|
||||
goto end;
|
||||
}
|
||||
if (info.lpszProxyBypass && !(session->proxy_bypass = strdupW( info.lpszProxyBypass )))
|
||||
{
|
||||
GlobalFree( (LPWSTR)info.lpszProxy );
|
||||
GlobalFree( (LPWSTR)info.lpszProxyBypass );
|
||||
GlobalFree( info.lpszProxy );
|
||||
GlobalFree( info.lpszProxyBypass );
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,9 +68,9 @@ static BOOL proxy_active(void)
|
|||
{
|
||||
active = (proxy_info.lpszProxy != NULL);
|
||||
if (active)
|
||||
GlobalFree((HGLOBAL) proxy_info.lpszProxy);
|
||||
GlobalFree(proxy_info.lpszProxy);
|
||||
if (proxy_info.lpszProxyBypass != NULL)
|
||||
GlobalFree((HGLOBAL) proxy_info.lpszProxyBypass);
|
||||
GlobalFree(proxy_info.lpszProxyBypass);
|
||||
}
|
||||
else
|
||||
active = FALSE;
|
||||
|
|
|
@ -46,9 +46,9 @@ static BOOL proxy_active(void)
|
|||
{
|
||||
active = (proxy_info.lpszProxy != NULL);
|
||||
if (active)
|
||||
GlobalFree((HGLOBAL) proxy_info.lpszProxy);
|
||||
GlobalFree(proxy_info.lpszProxy);
|
||||
if (proxy_info.lpszProxyBypass != NULL)
|
||||
GlobalFree((HGLOBAL) proxy_info.lpszProxyBypass);
|
||||
GlobalFree(proxy_info.lpszProxyBypass);
|
||||
}
|
||||
else
|
||||
active = FALSE;
|
||||
|
@ -1005,8 +1005,8 @@ static void set_default_proxy_reg_value( BYTE *buf, DWORD len, DWORD type )
|
|||
|
||||
static void test_set_default_proxy_config(void)
|
||||
{
|
||||
static const WCHAR wideString[] = { 0x226f, 0x575b, 0 };
|
||||
static const WCHAR normalString[] = { 'f','o','o',0 };
|
||||
static WCHAR wideString[] = { 0x226f, 0x575b, 0 };
|
||||
static WCHAR normalString[] = { 'f','o','o',0 };
|
||||
DWORD type, len;
|
||||
BYTE *saved_proxy_settings = NULL;
|
||||
WINHTTP_PROXY_INFO info;
|
||||
|
@ -2699,8 +2699,8 @@ static void test_WinHttpGetProxyForUrl(void)
|
|||
trace("%u\n", info.dwAccessType);
|
||||
trace("%s\n", wine_dbgstr_w(info.lpszProxy));
|
||||
trace("%s\n", wine_dbgstr_w(info.lpszProxyBypass));
|
||||
GlobalFree( (WCHAR *)info.lpszProxy );
|
||||
GlobalFree( (WCHAR *)info.lpszProxyBypass );
|
||||
GlobalFree( info.lpszProxy );
|
||||
GlobalFree( info.lpszProxyBypass );
|
||||
}
|
||||
WinHttpCloseHandle( session );
|
||||
}
|
||||
|
|
|
@ -487,8 +487,8 @@ typedef struct
|
|||
typedef struct
|
||||
{
|
||||
DWORD dwAccessType;
|
||||
LPCWSTR lpszProxy;
|
||||
LPCWSTR lpszProxyBypass;
|
||||
LPWSTR lpszProxy;
|
||||
LPWSTR lpszProxyBypass;
|
||||
} WINHTTP_PROXY_INFO, *LPWINHTTP_PROXY_INFO;
|
||||
typedef WINHTTP_PROXY_INFO WINHTTP_PROXY_INFOW;
|
||||
typedef LPWINHTTP_PROXY_INFO LPWINHTTP_PROXY_INFOW;
|
||||
|
|
Loading…
Reference in New Issue