[PATCH 3/7] winhttp: Don't mind socket state in WinHttpWebSocketQueryCloseStatus().

Paul Gofman pgofman at codeweavers.com
Thu Jan 27 17:06:27 CST 2022


Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
---
 dlls/winhttp/request.c            | 5 -----
 dlls/winhttp/tests/notification.c | 6 +++---
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c
index 10c1beb0d2b..8e13e678e22 100644
--- a/dlls/winhttp/request.c
+++ b/dlls/winhttp/request.c
@@ -3991,11 +3991,6 @@ DWORD WINAPI WinHttpWebSocketQueryCloseStatus( HINTERNET hsocket, USHORT *status
         release_object( &socket->hdr );
         return ERROR_WINHTTP_INCORRECT_HANDLE_TYPE;
     }
-    if (socket->state < SOCKET_STATE_CLOSED)
-    {
-        release_object( &socket->hdr );
-        return ERROR_INVALID_OPERATION;
-    }
 
     if (!socket->close_frame_received || socket->close_frame_receive_err)
     {
diff --git a/dlls/winhttp/tests/notification.c b/dlls/winhttp/tests/notification.c
index 6545a1d92fe..1ae1bb537b0 100644
--- a/dlls/winhttp/tests/notification.c
+++ b/dlls/winhttp/tests/notification.c
@@ -1126,9 +1126,9 @@ static void test_websocket(BOOL secure)
     close_status = 0xdead;
     size = sizeof(buffer) + 1;
     err = pWinHttpWebSocketQueryCloseStatus( socket, &close_status, buffer, sizeof(buffer), &size );
-    todo_wine ok( err == ERROR_SUCCESS, "got %u\n", err );
-    todo_wine ok( close_status == 1000, "got %u\n", close_status );
-    todo_wine ok( size <= sizeof(buffer), "got %u\n", size );
+    ok( err == ERROR_SUCCESS, "got %u\n", err );
+    ok( close_status == 1000, "got %u\n", close_status );
+    ok( size <= sizeof(buffer), "got %u\n", size );
 
     setup_test( &info, winhttp_close_handle, __LINE__ );
 
-- 
2.34.1




More information about the wine-devel mailing list