Paul Gofman : winhttp: Don't mind socket state in WinHttpWebSocketQueryCloseStatus().

Alexandre Julliard julliard at winehq.org
Fri Jan 28 14:29:32 CST 2022


Module: wine
Branch: master
Commit: 673a01a442c1a6b23fadde70783ea68db1cf71b7
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=673a01a442c1a6b23fadde70783ea68db1cf71b7

Author: Paul Gofman <pgofman at codeweavers.com>
Date:   Fri Jan 28 02:06:27 2022 +0300

winhttp: Don't mind socket state in WinHttpWebSocketQueryCloseStatus().

Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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__ );
 




More information about the wine-cvs mailing list