Some more cleanup

This commit is contained in:
Marek Roszko 2021-11-11 23:58:34 -05:00
parent 009bb7f033
commit 73f40b11ee
1 changed files with 19 additions and 18 deletions

View File

@ -154,9 +154,11 @@ bool KIPLATFORM::ENV::GetSystemProxyConfig( const wxString& aURL, PROXY_CONFIG&
if( autoProxyDetect ) if( autoProxyDetect )
{ {
proxyResolveSession = proxyResolveSession =
WinHttpOpen( L"kicad", WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY, WINHTTP_NO_PROXY_NAME, WinHttpOpen( NULL, WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY, WINHTTP_NO_PROXY_NAME,
WINHTTP_NO_PROXY_BYPASS, WINHTTP_FLAG_ASYNC ); WINHTTP_NO_PROXY_BYPASS, WINHTTP_FLAG_ASYNC );
if( proxyResolveSession )
{
// either we use the ie url or we set the auto detect mode // either we use the ie url or we set the auto detect mode
if( autoProxyOptions.lpszAutoConfigUrl != NULL ) if( autoProxyOptions.lpszAutoConfigUrl != NULL )
{ {
@ -174,10 +176,9 @@ bool KIPLATFORM::ENV::GetSystemProxyConfig( const wxString& aURL, PROXY_CONFIG&
autoProxyDetect = WinHttpGetProxyForUrl( proxyResolveSession, aURL.c_str(), autoProxyDetect = WinHttpGetProxyForUrl( proxyResolveSession, aURL.c_str(),
&autoProxyOptions, &autoProxyInfo ); &autoProxyOptions, &autoProxyInfo );
if( proxyResolveSession )
{
WinHttpCloseHandle( proxyResolveSession ); WinHttpCloseHandle( proxyResolveSession );
} }
} }
if( autoProxyDetect ) if( autoProxyDetect )