Juan Lang : winhttp: Check environment if the registry settings are present but bogus.

Alexandre Julliard julliard at winehq.org
Wed Jul 22 09:33:42 CDT 2009


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

Author: Juan Lang <juan.lang at gmail.com>
Date:   Tue Jul 21 11:38:54 2009 -0700

winhttp: Check environment if the registry settings are present but bogus.

---

 dlls/winhttp/session.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/winhttp/session.c b/dlls/winhttp/session.c
index 2ed53b0..683a6fb 100644
--- a/dlls/winhttp/session.c
+++ b/dlls/winhttp/session.c
@@ -851,7 +851,7 @@ BOOL WINAPI WinHttpGetDefaultProxyConfiguration( WINHTTP_PROXY_INFO *info )
 {
     LONG l;
     HKEY key;
-    BOOL direct = TRUE;
+    BOOL got_from_reg = FALSE, direct = TRUE;
     char *envproxy;
 
     TRACE("%p\n", info);
@@ -913,6 +913,7 @@ BOOL WINAPI WinHttpGetDefaultProxyConfiguration( WINHTTP_PROXY_INFO *info )
                         }
                         if (sane)
                         {
+                            got_from_reg = TRUE;
                             direct = FALSE;
                             info->dwAccessType =
                                 WINHTTP_ACCESS_TYPE_NAMED_PROXY;
@@ -927,7 +928,7 @@ BOOL WINAPI WinHttpGetDefaultProxyConfiguration( WINHTTP_PROXY_INFO *info )
         }
         RegCloseKey( key );
     }
-    else if ((envproxy = getenv( "http_proxy" )))
+    if (!got_from_reg && (envproxy = getenv( "http_proxy" )))
     {
         char *colon, *http_proxy;
 




More information about the wine-cvs mailing list