Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54623
-- v3: websocket: Add stub for WebSocketDeleteHandle. websocket: Add stub for WebSocketAbortHandle. websocket: Add stub for WebCreateClientHandle.
From: Vijay Kiran Kamuju infyquest@gmail.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54623 --- dlls/websocket/websocket.c | 31 ++++++++++++++++++++++ dlls/websocket/websocket.spec | 2 +- include/Makefile.in | 1 + include/websocket.h | 50 +++++++++++++++++++++++++++++++++++ 4 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 dlls/websocket/websocket.c create mode 100644 include/websocket.h
diff --git a/dlls/websocket/websocket.c b/dlls/websocket/websocket.c new file mode 100644 index 00000000000..0ea22fb5a0c --- /dev/null +++ b/dlls/websocket/websocket.c @@ -0,0 +1,31 @@ +/* + * Copyright 2023 Vijay Kiran Kamuju + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "wine/debug.h" + +#include "websocket.h" + +WINE_DEFAULT_DEBUG_CHANNEL(websocket); + +HRESULT WINAPI WebSocketCreateClientHandle(const PWEB_SOCKET_PROPERTY properties, + ULONG count, WEB_SOCKET_HANDLE *handle) +{ + FIXME("(%p, %ld, %p): stub\n", properties, count, handle); + + return E_NOTIMPL; +} diff --git a/dlls/websocket/websocket.spec b/dlls/websocket/websocket.spec index 36bfc74cf34..b02394f9373 100644 --- a/dlls/websocket/websocket.spec +++ b/dlls/websocket/websocket.spec @@ -2,7 +2,7 @@ @ stub WebSocketBeginClientHandshake @ stub WebSocketBeginServerHandshake @ stub WebSocketCompleteAction -@ stub WebSocketCreateClientHandle +@ stdcall WebSocketCreateClientHandle(ptr long ptr) @ stub WebSocketCreateServerHandle @ stub WebSocketDeleteHandle @ stub WebSocketEndClientHandshake diff --git a/include/Makefile.in b/include/Makefile.in index d4a166e265c..0c8c4373fc3 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -798,6 +798,7 @@ SOURCES = \ wdbgexts.h \ weakreference.idl \ webservices.h \ + websocket.h \ werapi.h \ wfext.h \ wia.h \ diff --git a/include/websocket.h b/include/websocket.h new file mode 100644 index 00000000000..3c215ddf736 --- /dev/null +++ b/include/websocket.h @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Vijay Kiran Kamuju + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_WEBSOCKET_H +#define __WINE_WEBSOCKET_H + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +DECLARE_HANDLE(WEB_SOCKET_HANDLE); + +typedef enum _WEB_SOCKET_PROPERTY_TYPE { + WEB_SOCKET_RECEIVE_BUFFER_SIZE_PROPERTY_TYPE = 0, + WEB_SOCKET_SEND_BUFFER_SIZE_PROPERTY_TYPE = 1, + WEB_SOCKET_DISABLE_MASKING_PROPERTY_TYPE = 2, + WEB_SOCKET_ALLOCATED_MASKING_PROPERTY_TYPE = 3, + WEB_SOCKET_DISABLE_UTF8_VERIFICATION_PROPERTY_TYPE = 4, + WEB_SOCKET_KEEPALIVE_INTERVAL_PROPERTY_TYPE = 5, + WEB_SOCKET_SUPPORTED_VERSIONS_PROPERTY_TYPE = 6 +} WEB_SOCKET_PROPERTY_TYPE; + +typedef struct _WEB_SOCKET_PROPERTY { + WEB_SOCKET_PROPERTY_TYPE Type; + PVOID pvValue; + ULONG ulValueSize; +} WEB_SOCKET_PROPERTY, *PWEB_SOCKET_PROPERTY; + +HRESULT WINAPI WebSocketCreateClientHandle(const PWEB_SOCKET_PROPERTY, ULONG, WEB_SOCKET_HANDLE*); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __WINE_WEBSOCKET_H */
From: Vijay Kiran Kamuju infyquest@gmail.com
--- dlls/websocket/websocket.c | 5 +++++ dlls/websocket/websocket.spec | 2 +- include/websocket.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/websocket/websocket.c b/dlls/websocket/websocket.c index 0ea22fb5a0c..ab68dea3c6b 100644 --- a/dlls/websocket/websocket.c +++ b/dlls/websocket/websocket.c @@ -29,3 +29,8 @@ HRESULT WINAPI WebSocketCreateClientHandle(const PWEB_SOCKET_PROPERTY properties
return E_NOTIMPL; } + +VOID WINAPI WebSocketAbortHandle(WEB_SOCKET_HANDLE handle) +{ + FIXME("(%p): stub\n", handle); +} diff --git a/dlls/websocket/websocket.spec b/dlls/websocket/websocket.spec index b02394f9373..8c6044d67b9 100644 --- a/dlls/websocket/websocket.spec +++ b/dlls/websocket/websocket.spec @@ -1,4 +1,4 @@ -@ stub WebSocketAbortHandle +@ stdcall WebSocketAbortHandle(long) @ stub WebSocketBeginClientHandshake @ stub WebSocketBeginServerHandshake @ stub WebSocketCompleteAction diff --git a/include/websocket.h b/include/websocket.h index 3c215ddf736..eb4782fc209 100644 --- a/include/websocket.h +++ b/include/websocket.h @@ -41,6 +41,7 @@ typedef struct _WEB_SOCKET_PROPERTY { ULONG ulValueSize; } WEB_SOCKET_PROPERTY, *PWEB_SOCKET_PROPERTY;
+VOID WINAPI WebSocketAbortHandle(WEB_SOCKET_HANDLE); HRESULT WINAPI WebSocketCreateClientHandle(const PWEB_SOCKET_PROPERTY, ULONG, WEB_SOCKET_HANDLE*);
#ifdef __cplusplus
From: Vijay Kiran Kamuju infyquest@gmail.com
--- dlls/websocket/websocket.c | 5 +++++ dlls/websocket/websocket.spec | 2 +- include/websocket.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/websocket/websocket.c b/dlls/websocket/websocket.c index ab68dea3c6b..8668f96ac37 100644 --- a/dlls/websocket/websocket.c +++ b/dlls/websocket/websocket.c @@ -34,3 +34,8 @@ VOID WINAPI WebSocketAbortHandle(WEB_SOCKET_HANDLE handle) { FIXME("(%p): stub\n", handle); } + +VOID WINAPI WebSocketDeleteHandle(WEB_SOCKET_HANDLE handle) +{ + FIXME("(%p): stub\n", handle); +} diff --git a/dlls/websocket/websocket.spec b/dlls/websocket/websocket.spec index 8c6044d67b9..2b90740201f 100644 --- a/dlls/websocket/websocket.spec +++ b/dlls/websocket/websocket.spec @@ -4,7 +4,7 @@ @ stub WebSocketCompleteAction @ stdcall WebSocketCreateClientHandle(ptr long ptr) @ stub WebSocketCreateServerHandle -@ stub WebSocketDeleteHandle +@ stdcall WebSocketDeleteHandle(long) @ stub WebSocketEndClientHandshake @ stub WebSocketEndServerHandshake @ stub WebSocketGetAction diff --git a/include/websocket.h b/include/websocket.h index eb4782fc209..acf6caabe67 100644 --- a/include/websocket.h +++ b/include/websocket.h @@ -43,6 +43,7 @@ typedef struct _WEB_SOCKET_PROPERTY {
VOID WINAPI WebSocketAbortHandle(WEB_SOCKET_HANDLE); HRESULT WINAPI WebSocketCreateClientHandle(const PWEB_SOCKET_PROPERTY, ULONG, WEB_SOCKET_HANDLE*); +VOID WINAPI WebSocketDeleteHandle(WEB_SOCKET_HANDLE);
#ifdef __cplusplus }
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=140635
Your paranoid android.
=== debian11 (build log) ===
/usr/bin/i686-w64-mingw32-ld: tmp65a2dc13/websocket-00000000.spec.o:fake:(.edata+0x28): undefined reference to `WebSocketAbortHandle@4' /usr/bin/i686-w64-mingw32-ld: tmp65a2dc13/websocket-00000000.spec.o:fake:(.edata+0x38): undefined reference to `WebSocketCreateClientHandle@12' /usr/bin/i686-w64-mingw32-ld: tmp65a2dc13/websocket-00000000.spec.o:fake:(.edata+0x40): undefined reference to `WebSocketDeleteHandle@4' collect2: error: ld returned 1 exit status Task: The win32 Wine build failed
=== debian11b (build log) ===
/usr/bin/x86_64-w64-mingw32-ld: tmp65a7078c/websocket-00000000.spec.o:fake:(.edata+0x28): undefined reference to `WebSocketAbortHandle' /usr/bin/x86_64-w64-mingw32-ld: tmp65a7078c/websocket-00000000.spec.o:fake:(.edata+0x38): undefined reference to `WebSocketCreateClientHandle' /usr/bin/x86_64-w64-mingw32-ld: tmp65a7078c/websocket-00000000.spec.o:fake:(.edata+0x40): undefined reference to `WebSocketDeleteHandle' collect2: error: ld returned 1 exit status Task: The wow64 Wine build failed
On Fri Dec 1 21:59:26 2023 +0000, Nikolay Sivov wrote:
Does this help anything?
It make the app in the bug to start but later crash or unresponsive due some more unimplemented functionality
On Fri Dec 1 21:59:26 2023 +0000, Vijay Kiran Kamuju wrote:
It make the app in the bug to start but later crash or unresponsive due some more unimplemented functionality
The user in the Wine-Bug, who has a required paid account, tested the patch for the stub function I [attached there](https://bugs.winehq.org/attachment.cgi?id=74153&action=diff) and said it does not help:
I also am getting a dotnet exception dialog "Error 3:The type initializer for 'System.Net.WebSockets.WebSocketProtocolComponent' threw an exception" just before it hangs.
They also confirmed that native websocket fixes the issue and allows the application to start. I could have made an MR for the patch myself, but a stub does not help, it needs an implementation.
Between this and https://gitlab.winehq.org/wine/wine/-/merge_requests/4555, I don't understand, are we now adding in stubs that don't help? Last time I did that I got grilled so hard I became a shish kebab with extra tahini.
On Fri Dec 1 23:01:43 2023 +0000, Mohamad Al-Jaf wrote:
The user in the Wine-Bug, who has a required paid account, tested the patch for the stub function I [attached there](https://bugs.winehq.org/attachment.cgi?id=74153&action=diff) and said it does not help:
I also am getting a dotnet exception dialog "Error 3:The type
initializer for 'System.Net.WebSockets.WebSocketProtocolComponent' threw an exception" just before it hangs. They also confirmed that native websocket fixes the issue and allows the application to start. I could have made an MR for the patch myself, but a stub does not help, it needs an implementation. Between this and https://gitlab.winehq.org/wine/wine/-/merge_requests/4555, I don't understand, are we now adding in stubs that don't help? Last time I did that I got grilled so hard I became a shish kebab with extra tahini.
It seems I missed that discussion, I will keep this open till it's needed - so that it will not missed.