winhttp(4/3): If the default proxy settings are not found, delete the bogus ones after test

Juan Lang juan.lang at gmail.com
Tue Jul 21 14:24:18 CDT 2009


This should have been part of the series.  The tests were failing for
me after a first run because the registry had bogus values in it,
created by the tests.  The previous patch lets the test succeed even
with bogus values, while this patch prevents the bogus values from
being created (by the tests) in the first place.
--Juan
-------------- next part --------------
From a31b3fed975e64e2fc15dece32c0a932928dd19a Mon Sep 17 00:00:00 2001
From: Juan Lang <juan.lang at gmail.com>
Date: Tue, 21 Jul 2009 12:23:04 -0700
Subject: [PATCH 8/8] If the default proxy settings are not found, delete the bogus ones after test

---
 dlls/winhttp/tests/winhttp.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c
index bce91fe..76e08e0 100644
--- a/dlls/winhttp/tests/winhttp.c
+++ b/dlls/winhttp/tests/winhttp.c
@@ -867,7 +867,10 @@ static void set_default_proxy_reg_value( BYTE *buf, DWORD len, DWORD type )
         KEY_WRITE, NULL, &key, NULL );
     if (!l)
     {
-        RegSetValueExW( key, WinHttpSettings, 0, type, buf, len );
+        if (len)
+            RegSetValueExW( key, WinHttpSettings, 0, type, buf, len );
+        else
+            RegDeleteValueW( key, WinHttpSettings );
         RegCloseKey( key );
     }
 }
-- 
1.6.3.2


More information about the wine-patches mailing list