Dmitry Timoshkov : winhttp/tests: Fix spurious crashes under Windows.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Dec 7 08:26:42 CST 2015


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

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Mon Dec  7 13:15:53 2015 +0800

winhttp/tests: Fix spurious crashes under Windows.

Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winhttp/tests/winhttp.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c
index 2b460df..c41ff62 100644
--- a/dlls/winhttp/tests/winhttp.c
+++ b/dlls/winhttp/tests/winhttp.c
@@ -3574,15 +3574,15 @@ static void test_IWinHttpRequest(void)
     SysFreeString( method );
     SysFreeString( url );
 
-    V_VT( &data ) = VT_BSTR;
-    V_BSTR( &data ) = NULL;
-    hr = IWinHttpRequest_Send( req, data );
-    ok( hr == S_OK, "got %08x\n", hr );
-
-    hr = IWinHttpRequest_get_ResponseText( req, &response );
-    ok( hr == S_OK, "got %08x\n", hr );
-    ok( !memcmp(response, data_start, sizeof(data_start)), "got %s\n", wine_dbgstr_wn(response, 32) );
-    SysFreeString( response );
+    hr = IWinHttpRequest_Send( req, empty );
+    ok( hr == S_OK || broken(hr == HRESULT_FROM_WIN32( ERROR_WINHTTP_INVALID_SERVER_RESPONSE )), "got %08x\n", hr );
+    if (hr == S_OK)
+    {
+        hr = IWinHttpRequest_get_ResponseText( req, &response );
+        ok( hr == S_OK, "got %08x\n", hr );
+        ok( !memcmp(response, data_start, sizeof(data_start)), "got %s\n", wine_dbgstr_wn(response, 32) );
+        SysFreeString( response );
+    }
 
     IWinHttpRequest_Release( req );
 




More information about the wine-cvs mailing list