Module: wine Branch: master Commit: 8946346f51b9d788e39a53b6bf615d13bb3a6f51 URL: http://source.winehq.org/git/wine.git/?a=commit;h=8946346f51b9d788e39a53b6bf...
Author: Hans Leidekker hans@codeweavers.com Date: Mon Oct 14 15:57:59 2013 +0200
winhttp: Fix a test failure on Windows 8 and conform to the more recent behavior.
---
dlls/winhttp/session.c | 6 +++++- dlls/winhttp/tests/winhttp.c | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/winhttp/session.c b/dlls/winhttp/session.c index 660eae5..97e763e 100644 --- a/dlls/winhttp/session.c +++ b/dlls/winhttp/session.c @@ -1365,7 +1365,11 @@ BOOL WINAPI WinHttpDetectAutoProxyConfigUrl( DWORD flags, LPWSTR *url ) FIXME("getaddrinfo not found at build time\n"); #endif } - if (!ret) set_last_error( ERROR_WINHTTP_AUTODETECTION_FAILED ); + if (!ret) + { + set_last_error( ERROR_WINHTTP_AUTODETECTION_FAILED ); + *url = NULL; + } return ret; }
diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c index 3157a44..19bd429 100644 --- a/dlls/winhttp/tests/winhttp.c +++ b/dlls/winhttp/tests/winhttp.c @@ -2759,7 +2759,7 @@ if (0) /* crashes on some win2k systems */ if (!ret) { ok( error == ERROR_WINHTTP_AUTODETECTION_FAILED, "got %u\n", error ); - ok( url == (WCHAR *)0xdeadbeef, "got %p\n", url ); + ok( !url || broken(url == (WCHAR *)0xdeadbeef), "got %p\n", url ); } else { @@ -2774,7 +2774,7 @@ if (0) /* crashes on some win2k systems */ if (!ret) { ok( error == ERROR_WINHTTP_AUTODETECTION_FAILED, "got %u\n", error ); - ok( url == (WCHAR *)0xdeadbeef, "got %p\n", url ); + ok( !url || broken(url == (WCHAR *)0xdeadbeef), "got %p\n", url ); } else {