winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
June 2022
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
791 discussions
Start a n
N
ew thread
Rémi Bernon : windows.gaming.input: Implement stub IGamepad2 interface.
by Alexandre Julliard
08 Jun '22
08 Jun '22
Module: wine Branch: master Commit: 2692e59f46196c31684f12d5d3b5f1ca17abca81 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2692e59f46196c31684f12d5…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Jun 8 13:44:13 2022 +0200 windows.gaming.input: Implement stub IGamepad2 interface. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> --- dlls/windows.gaming.input/gamepad.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/dlls/windows.gaming.input/gamepad.c b/dlls/windows.gaming.input/gamepad.c index 5efc9f13ea8..112ec49a1d3 100644 --- a/dlls/windows.gaming.input/gamepad.c +++ b/dlls/windows.gaming.input/gamepad.c @@ -61,6 +61,7 @@ struct gamepad IGameControllerImpl IGameControllerImpl_iface; IGameControllerInputSink IGameControllerInputSink_iface; IGamepad IGamepad_iface; + IGamepad2 IGamepad2_iface; IGameController *IGameController_outer; LONG ref; @@ -99,6 +100,12 @@ static HRESULT WINAPI controller_QueryInterface( IGameControllerImpl *iface, REF return S_OK; } + if (IsEqualGUID( iid, &IID_IGamepad2 )) + { + IInspectable_AddRef( (*out = &impl->IGamepad2_iface) ); + return S_OK; + } + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); *out = NULL; return E_NOINTERFACE; @@ -330,6 +337,28 @@ static const struct IGamepadVtbl gamepad_vtbl = gamepad_GetCurrentReading, }; +DEFINE_IINSPECTABLE_OUTER( gamepad2, IGamepad2, struct gamepad, IGameController_outer ) + +static HRESULT WINAPI gamepad2_GetButtonLabel( IGamepad2 *iface, GamepadButtons button, GameControllerButtonLabel *value ) +{ + FIXME( "iface %p, button %#x, value %p stub!\n", iface, button, value ); + *value = GameControllerButtonLabel_None; + return S_OK; +} + +static const struct IGamepad2Vtbl gamepad2_vtbl = +{ + gamepad2_QueryInterface, + gamepad2_AddRef, + gamepad2_Release, + /* IInspectable methods */ + gamepad2_GetIids, + gamepad2_GetRuntimeClassName, + gamepad2_GetTrustLevel, + /* IGamepad2 methods */ + gamepad2_GetButtonLabel, +}; + struct gamepad_statics { IActivationFactory IActivationFactory_iface; @@ -542,6 +571,7 @@ static HRESULT WINAPI controller_factory_CreateGameController( ICustomGameContro impl->IGameControllerImpl_iface.lpVtbl = &controller_vtbl; impl->IGameControllerInputSink_iface.lpVtbl = &input_sink_vtbl; impl->IGamepad_iface.lpVtbl = &gamepad_vtbl; + impl->IGamepad2_iface.lpVtbl = &gamepad2_vtbl; impl->ref = 1; TRACE( "created Gamepad %p\n", impl );
1
0
0
0
Rémi Bernon : include: Add Windows.Gaming.Input.IGamepad2 interface declaration.
by Alexandre Julliard
08 Jun '22
08 Jun '22
Module: wine Branch: master Commit: e8b06de490c64fa21015b7edba89c1f19d23a8f8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e8b06de490c64fa21015b7ed…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Tue Jun 7 17:24:55 2022 +0200 include: Add Windows.Gaming.Input.IGamepad2 interface declaration. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> --- include/windows.gaming.input.idl | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/windows.gaming.input.idl b/include/windows.gaming.input.idl index fdae3aa70b1..5fc5265247d 100644 --- a/include/windows.gaming.input.idl +++ b/include/windows.gaming.input.idl @@ -446,6 +446,19 @@ namespace Windows.Gaming.Input { HRESULT GetCurrentReading([out, retval] Windows.Gaming.Input.GamepadReading *value); } + [ + contract(Windows.Foundation.UniversalApiContract, 3.0), + exclusiveto(Windows.Gaming.Input.Gamepad), + uuid(3c1689bd-5915-4245-b0c0-c89fae0308ff) + ] + interface IGamepad2 : IInspectable + requires Windows.Gaming.Input.IGamepad, + Windows.Gaming.Input.IGameController + { + HRESULT GetButtonLabel([in] Windows.Gaming.Input.GamepadButtons button, + [out, retval] Windows.Gaming.Input.GameControllerButtonLabel *value); + } + [ contract(Windows.Foundation.UniversalApiContract, 3.0), exclusiveto(Windows.Gaming.Input.RacingWheel),
1
0
0
0
Rémi Bernon : windows.gaming.input: Consistently use FIXME for E_NOINTERFACE messages.
by Alexandre Julliard
08 Jun '22
08 Jun '22
Module: wine Branch: master Commit: 622d98b74aee8ab725dd899b3d3968f98773fb8b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=622d98b74aee8ab725dd899b…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Jun 8 13:43:48 2022 +0200 windows.gaming.input: Consistently use FIXME for E_NOINTERFACE messages. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> --- dlls/windows.gaming.input/async.c | 2 +- dlls/windows.gaming.input/controller.c | 2 +- dlls/windows.gaming.input/gamepad.c | 2 +- dlls/windows.gaming.input/racing_wheel.c | 2 +- dlls/windows.gaming.input/vector.c | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/windows.gaming.input/async.c b/dlls/windows.gaming.input/async.c index 8483f301b83..c41abe96cd1 100644 --- a/dlls/windows.gaming.input/async.c +++ b/dlls/windows.gaming.input/async.c @@ -73,7 +73,7 @@ static HRESULT WINAPI async_impl_QueryInterface( IWineAsyncInfoImpl *iface, REFI return S_OK; } - WARN( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); *out = NULL; return E_NOINTERFACE; } diff --git a/dlls/windows.gaming.input/controller.c b/dlls/windows.gaming.input/controller.c index e372ea6c9bf..bd3d441c445 100644 --- a/dlls/windows.gaming.input/controller.c +++ b/dlls/windows.gaming.input/controller.c @@ -99,7 +99,7 @@ static HRESULT WINAPI controller_QueryInterface( IGameControllerImpl *iface, REF return S_OK; } - WARN( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); *out = NULL; return E_NOINTERFACE; } diff --git a/dlls/windows.gaming.input/gamepad.c b/dlls/windows.gaming.input/gamepad.c index 0c38fb5cd1a..5efc9f13ea8 100644 --- a/dlls/windows.gaming.input/gamepad.c +++ b/dlls/windows.gaming.input/gamepad.c @@ -99,7 +99,7 @@ static HRESULT WINAPI controller_QueryInterface( IGameControllerImpl *iface, REF return S_OK; } - WARN( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); *out = NULL; return E_NOINTERFACE; } diff --git a/dlls/windows.gaming.input/racing_wheel.c b/dlls/windows.gaming.input/racing_wheel.c index 4a494775dc2..d646ca26c03 100644 --- a/dlls/windows.gaming.input/racing_wheel.c +++ b/dlls/windows.gaming.input/racing_wheel.c @@ -99,7 +99,7 @@ static HRESULT WINAPI controller_QueryInterface( IGameControllerImpl *iface, REF return S_OK; } - WARN( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); *out = NULL; return E_NOINTERFACE; } diff --git a/dlls/windows.gaming.input/vector.c b/dlls/windows.gaming.input/vector.c index db1a9057682..8958b07c0f2 100644 --- a/dlls/windows.gaming.input/vector.c +++ b/dlls/windows.gaming.input/vector.c @@ -54,7 +54,7 @@ static HRESULT WINAPI iterator_QueryInterface( IIterator_IInspectable *iface, RE return S_OK; } - WARN( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); *out = NULL; return E_NOINTERFACE; } @@ -189,7 +189,7 @@ static HRESULT WINAPI vector_view_QueryInterface( IVectorView_IInspectable *ifac return S_OK; } - WARN( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); *out = NULL; return E_NOINTERFACE; } @@ -384,7 +384,7 @@ static HRESULT WINAPI vector_QueryInterface( IVector_IInspectable *iface, REFIID return S_OK; } - WARN( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); + FIXME( "%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid( iid ) ); *out = NULL; return E_NOINTERFACE; }
1
0
0
0
Paul Gofman : winhttp/tests: Add tests for closing web socket with pending operations.
by Alexandre Julliard
08 Jun '22
08 Jun '22
Module: wine Branch: master Commit: d0a3248e7a12fd5e794b11b067fbbc8150a5db1f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d0a3248e7a12fd5e794b11b0…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Mon Jun 6 20:43:41 2022 -0500 winhttp/tests: Add tests for closing web socket with pending operations. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> --- dlls/winhttp/tests/notification.c | 190 +++++++++++++++++++++++++++++++++++++- 1 file changed, 189 insertions(+), 1 deletion(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=d0a3248e7a12fd5e794b…
1
0
0
0
Paul Gofman : winhttp: Support abort in task_socket_close().
by Alexandre Julliard
08 Jun '22
08 Jun '22
Module: wine Branch: master Commit: 1b766caa48e8675f97016a2ee749dc3d89010400 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1b766caa48e8675f97016a2e…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Mon Jun 6 20:24:21 2022 -0500 winhttp: Support abort in task_socket_close(). Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> --- dlls/winhttp/request.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index 269af0826c0..2754dc29163 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -4145,13 +4145,18 @@ static void task_socket_close( void *ctx, BOOL abort ) struct socket *socket = (struct socket *)s->task_hdr.obj; DWORD ret; - if (abort) return; + if (abort) + { + socket_close_complete( socket, ERROR_WINHTTP_OPERATION_CANCELLED ); + return; + } TRACE("running %p\n", ctx); ret = socket_close( socket ); receive_io_complete( socket ); - socket_close_complete( socket, ret ); + if (task_needs_completion( &s->task_hdr )) + socket_close_complete( socket, ret ); } DWORD WINAPI WinHttpWebSocketClose( HINTERNET hsocket, USHORT status, void *reason, DWORD len )
1
0
0
0
Paul Gofman : winhttp: Abort websocket IO on handle close.
by Alexandre Julliard
08 Jun '22
08 Jun '22
Module: wine Branch: master Commit: 55425e85ab0d80d467e6d6261ea39931820b3ed0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=55425e85ab0d80d467e6d626…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Fri Jun 3 17:33:50 2022 -0500 winhttp: Abort websocket IO on handle close. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> --- dlls/winhttp/handle.c | 7 ++++++- dlls/winhttp/net.c | 10 +++++++++- dlls/winhttp/request.c | 21 +++++++++++++++++++-- dlls/winhttp/session.c | 3 +++ dlls/winhttp/winhttp_private.h | 2 ++ 5 files changed, 39 insertions(+), 4 deletions(-) diff --git a/dlls/winhttp/handle.c b/dlls/winhttp/handle.c index 38959fd6456..33a4cd6bb71 100644 --- a/dlls/winhttp/handle.c +++ b/dlls/winhttp/handle.c @@ -142,7 +142,12 @@ BOOL free_handle( HINTERNET hinternet ) LeaveCriticalSection( &handle_cs ); - if (hdr) release_object( hdr ); + if (hdr) + { + if (hdr->vtbl->handle_closing) + hdr->vtbl->handle_closing( hdr ); + release_object( hdr ); + } EnterCriticalSection( &handle_cs ); if (next_handle > handle && !handles[handle]) next_handle = handle; diff --git a/dlls/winhttp/net.c b/dlls/winhttp/net.c index 07a65c5465f..17520a54f63 100644 --- a/dlls/winhttp/net.c +++ b/dlls/winhttp/net.c @@ -269,7 +269,8 @@ void netconn_close( struct netconn *conn ) free(conn->extra_buf); DeleteSecurityContext(&conn->ssl_ctx); } - closesocket( conn->socket ); + if (conn->socket != -1) + closesocket( conn->socket ); release_host( conn->host ); free(conn); } @@ -629,6 +630,13 @@ DWORD netconn_recv( struct netconn *conn, void *buf, size_t len, int flags, int return ERROR_SUCCESS; } +void netconn_cancel_io( struct netconn *conn ) +{ + SOCKET socket = InterlockedExchange( (LONG *)&conn->socket, -1 ); + + closesocket( socket ); +} + ULONG netconn_query_data_available( struct netconn *conn ) { return conn->secure ? conn->peek_len : 0; diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index 4242551ee3b..269af0826c0 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -231,9 +231,10 @@ static BOOL task_needs_completion( struct task_header *task_hdr ) return !InterlockedExchange( &task_hdr->completion_sent, 1 ); } -static void cancel_queue( struct queue *queue ) +static BOOL cancel_queue( struct queue *queue ) { struct task_header *task_hdr, *found; + BOOL cancelled = FALSE; while (1) { @@ -250,9 +251,11 @@ static void cancel_queue( struct queue *queue ) } ReleaseSRWLockExclusive( &queue->lock ); if (!found) break; + cancelled = TRUE; found->callback( found, TRUE ); release_task( found ); } + return cancelled; } static void free_header( struct header *header ) @@ -1885,7 +1888,8 @@ static void finished_reading( struct request *request ) if (!request->netconn) return; - if (request->hdr.disable_flags & WINHTTP_DISABLE_KEEP_ALIVE) close = TRUE; + if (request->netconn->socket == -1) close = TRUE; + else if (request->hdr.disable_flags & WINHTTP_DISABLE_KEEP_ALIVE) close = TRUE; else if (!query_headers( request, WINHTTP_QUERY_CONNECTION, NULL, connection, &size, NULL ) || !query_headers( request, WINHTTP_QUERY_PROXY_CONNECTION, NULL, connection, &size, NULL )) { @@ -3121,6 +3125,18 @@ BOOL WINAPI WinHttpWriteData( HINTERNET hrequest, const void *buffer, DWORD to_w return !ret; } +static void socket_handle_closing( struct object_header *hdr ) +{ + struct socket *socket = (struct socket *)hdr; + BOOL pending_tasks; + + pending_tasks = cancel_queue( &socket->send_q ); + pending_tasks = cancel_queue( &socket->recv_q ) || pending_tasks; + + if (pending_tasks) + netconn_cancel_io( socket->request->netconn ); +} + static BOOL socket_query_option( struct object_header *hdr, DWORD option, void *buffer, DWORD *buflen ) { FIXME( "unimplemented option %lu\n", option ); @@ -3151,6 +3167,7 @@ static BOOL socket_set_option( struct object_header *hdr, DWORD option, void *bu static const struct object_vtbl socket_vtbl = { + socket_handle_closing, socket_destroy, socket_query_option, socket_set_option, diff --git a/dlls/winhttp/session.c b/dlls/winhttp/session.c index 3b00d2448d1..01e95895eb3 100644 --- a/dlls/winhttp/session.c +++ b/dlls/winhttp/session.c @@ -242,6 +242,7 @@ static BOOL session_set_option( struct object_header *hdr, DWORD option, void *b static const struct object_vtbl session_vtbl = { + NULL, session_destroy, session_query_option, session_set_option @@ -382,6 +383,7 @@ static BOOL connect_query_option( struct object_header *hdr, DWORD option, void static const struct object_vtbl connect_vtbl = { + NULL, connect_destroy, connect_query_option, NULL @@ -1085,6 +1087,7 @@ static BOOL request_set_option( struct object_header *hdr, DWORD option, void *b static const struct object_vtbl request_vtbl = { + NULL, request_destroy, request_query_option, request_set_option diff --git a/dlls/winhttp/winhttp_private.h b/dlls/winhttp/winhttp_private.h index 17102107c77..98e05f068ba 100644 --- a/dlls/winhttp/winhttp_private.h +++ b/dlls/winhttp/winhttp_private.h @@ -30,6 +30,7 @@ struct object_header; struct object_vtbl { + void (*handle_closing) ( struct object_header * ); void (*destroy)( struct object_header * ); BOOL (*query_option)( struct object_header *, DWORD, void *, DWORD * ); BOOL (*set_option)( struct object_header *, DWORD, void *, DWORD ); @@ -370,6 +371,7 @@ DWORD netconn_recv( struct netconn *, void *, size_t, int, int * ) DECLSPEC_HIDD DWORD netconn_resolve( WCHAR *, INTERNET_PORT, struct sockaddr_storage *, int ) DECLSPEC_HIDDEN; DWORD netconn_secure_connect( struct netconn *, WCHAR *, DWORD, CredHandle *, BOOL ) DECLSPEC_HIDDEN; DWORD netconn_send( struct netconn *, const void *, size_t, int *, WSAOVERLAPPED * ) DECLSPEC_HIDDEN; +void netconn_cancel_io( struct netconn *conn ) DECLSPEC_HIDDEN; DWORD netconn_set_timeout( struct netconn *, BOOL, int ) DECLSPEC_HIDDEN; BOOL netconn_is_alive( struct netconn * ) DECLSPEC_HIDDEN; const void *netconn_get_certificate( struct netconn * ) DECLSPEC_HIDDEN;
1
0
0
0
Paul Gofman : winhttp: Replace pending read cancel in WinHttpWebSocketClose() with a generic cancel_queue().
by Alexandre Julliard
08 Jun '22
08 Jun '22
Module: wine Branch: master Commit: 3eda59afcbd504bc3c1eb1e4e491c0cb6f3015a6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3eda59afcbd504bc3c1eb1e4…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Mon Jun 6 19:07:44 2022 -0500 winhttp: Replace pending read cancel in WinHttpWebSocketClose() with a generic cancel_queue(). Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> --- dlls/winhttp/request.c | 108 +++++++++++++++++++++++++++++------------ dlls/winhttp/winhttp_private.h | 3 +- 2 files changed, 78 insertions(+), 33 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=3eda59afcbd504bc3c1e…
1
0
0
0
Paul Gofman : winhttp: Fix dwResult field in websocket receive error result.
by Alexandre Julliard
08 Jun '22
08 Jun '22
Module: wine Branch: master Commit: 66ff3594c4f6d84b9437a247d411562e65c133c4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=66ff3594c4f6d84b9437a247…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Mon Jun 6 22:01:45 2022 -0500 winhttp: Fix dwResult field in websocket receive error result. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> --- dlls/winhttp/request.c | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index 70d727c7e2e..29887c8d7d0 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -3839,6 +3839,25 @@ static DWORD socket_receive( struct socket *socket, void *buf, DWORD len, DWORD return ret; } +static void socket_receive_complete( struct socket *socket, DWORD ret, WINHTTP_WEB_SOCKET_BUFFER_TYPE type, DWORD len ) +{ + if (!ret) + { + WINHTTP_WEB_SOCKET_STATUS status; + status.dwBytesTransferred = len; + status.eBufferType = type; + send_callback( &socket->hdr, WINHTTP_CALLBACK_STATUS_READ_COMPLETE, &status, sizeof(status) ); + } + else + { + WINHTTP_WEB_SOCKET_ASYNC_RESULT result; + result.AsyncResult.dwResult = 0; + result.AsyncResult.dwError = ret; + result.Operation = WINHTTP_WEB_SOCKET_RECEIVE_OPERATION; + send_callback( &socket->hdr, WINHTTP_CALLBACK_STATUS_REQUEST_ERROR, &result, sizeof(result) ); + } +} + static void task_socket_receive( void *ctx ) { struct socket_receive *r = ctx; @@ -3850,23 +3869,7 @@ static void task_socket_receive( void *ctx ) ret = socket_receive( socket, r->buf, r->len, &count, &type ); if (receive_io_complete( socket )) - { - if (!ret) - { - WINHTTP_WEB_SOCKET_STATUS status; - status.dwBytesTransferred = count; - status.eBufferType = type; - send_callback( &socket->hdr, WINHTTP_CALLBACK_STATUS_READ_COMPLETE, &status, sizeof(status) ); - } - else - { - WINHTTP_WEB_SOCKET_ASYNC_RESULT result; - result.AsyncResult.dwResult = API_READ_DATA; - result.AsyncResult.dwError = ret; - result.Operation = WINHTTP_WEB_SOCKET_RECEIVE_OPERATION; - send_callback( &socket->hdr, WINHTTP_CALLBACK_STATUS_REQUEST_ERROR, &result, sizeof(result) ); - } - } + socket_receive_complete( socket, ret, type, count ); } DWORD WINAPI WinHttpWebSocketReceive( HINTERNET hsocket, void *buf, DWORD len, DWORD *ret_len,
1
0
0
0
Paul Gofman : winhttp: Implement reference counting for tasks.
by Alexandre Julliard
08 Jun '22
08 Jun '22
Module: wine Branch: master Commit: 3d199dd92ea8d74925371c9fc375b85436206972 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3d199dd92ea8d74925371c9f…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Mon Jun 6 21:52:22 2022 -0500 winhttp: Implement reference counting for tasks. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> --- dlls/winhttp/request.c | 32 +++++++++++++++++++++++++++----- dlls/winhttp/winhttp_private.h | 1 + 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index 9abe4f45598..70d727c7e2e 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -135,20 +135,41 @@ void stop_queue( struct queue *queue ) TRACE("stopped %p\n", queue); } +static void addref_task( struct task_header *task ) +{ + InterlockedIncrement( &task->refs ); +} + +static void release_task( struct task_header *task ) +{ + if (!InterlockedDecrement( &task->refs )) + free( task ); +} + static struct task_header *get_next_task( struct queue *queue, struct task_header *prev_task ) { + struct task_header *task; struct list *entry; AcquireSRWLockExclusive( &queue->lock ); assert( queue->callback_running ); if (prev_task) + { list_remove( &prev_task->entry ); - - if (!(entry = list_head( &queue->queued_tasks ))) + release_task( prev_task ); + } + if ((entry = list_head( &queue->queued_tasks ))) + { + task = LIST_ENTRY( entry, struct task_header, entry ); + addref_task( task ); + } + else + { + task = NULL; queue->callback_running = FALSE; + } ReleaseSRWLockExclusive( &queue->lock ); - if (!entry) return NULL; - return LIST_ENTRY( entry, struct task_header, entry ); + return task; } static void CALLBACK task_callback( TP_CALLBACK_INSTANCE *instance, void *ctx ) @@ -165,7 +186,7 @@ static void CALLBACK task_callback( TP_CALLBACK_INSTANCE *instance, void *ctx ) /* Queue object may be freed by release_object() unless there is another task referencing it. */ next_task = get_next_task( queue, task ); release_object( task->obj ); - free( task ); + release_task( task ); task = next_task; } TRACE( "instance %p exiting.\n", instance ); @@ -178,6 +199,7 @@ static DWORD queue_task( struct queue *queue, TASK_CALLBACK task, struct task_he TRACE("queueing %p in %p\n", task_hdr, queue); task_hdr->callback = task; + task_hdr->refs = 1; task_hdr->obj = obj; addref_object( obj ); diff --git a/dlls/winhttp/winhttp_private.h b/dlls/winhttp/winhttp_private.h index 4754d9258d1..ee3cdb78157 100644 --- a/dlls/winhttp/winhttp_private.h +++ b/dlls/winhttp/winhttp_private.h @@ -281,6 +281,7 @@ struct task_header struct list entry; TASK_CALLBACK callback; struct object_header *obj; + volatile LONG refs; }; struct send_request
1
0
0
0
Paul Gofman : winhttp: Keep task in queue until completion.
by Alexandre Julliard
08 Jun '22
08 Jun '22
Module: wine Branch: master Commit: 5d2f2797e32f84993e898c18cd422e2a0514ba3d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5d2f2797e32f84993e898c18…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Mon Jun 6 21:49:07 2022 -0500 winhttp: Keep task in queue until completion. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> --- dlls/winhttp/request.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index fe703c19109..9abe4f45598 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -135,15 +135,16 @@ void stop_queue( struct queue *queue ) TRACE("stopped %p\n", queue); } -static struct task_header *get_next_task( struct queue *queue ) +static struct task_header *get_next_task( struct queue *queue, struct task_header *prev_task ) { struct list *entry; AcquireSRWLockExclusive( &queue->lock ); assert( queue->callback_running ); - if ((entry = list_head( &queue->queued_tasks ))) - list_remove( entry ); - else + if (prev_task) + list_remove( &prev_task->entry ); + + if (!(entry = list_head( &queue->queued_tasks ))) queue->callback_running = FALSE; ReleaseSRWLockExclusive( &queue->lock ); if (!entry) return NULL; @@ -157,12 +158,12 @@ static void CALLBACK task_callback( TP_CALLBACK_INSTANCE *instance, void *ctx ) TRACE( "instance %p.\n", instance ); - task = get_next_task( queue ); + task = get_next_task( queue, NULL ); while (task) { task->callback( task ); /* Queue object may be freed by release_object() unless there is another task referencing it. */ - next_task = get_next_task( queue ); + next_task = get_next_task( queue, task ); release_object( task->obj ); free( task ); task = next_task;
1
0
0
0
← Newer
1
...
54
55
56
57
58
59
60
...
80
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Results per page:
10
25
50
100
200