Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
97f9dc7f
Commit
97f9dc7f
authored
Jun 29, 2020
by
Hans Leidekker
Committed by
Alexandre Julliard
Jun 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Stop the send queue before sending the close message.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
dffd8e86
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
3 deletions
+14
-3
request.c
dlls/winhttp/request.c
+12
-2
session.c
dlls/winhttp/session.c
+1
-1
winhttp_private.h
dlls/winhttp/winhttp_private.h
+1
-0
No files found.
dlls/winhttp/request.c
View file @
97f9dc7f
...
...
@@ -138,6 +138,14 @@ static DWORD start_queue( struct queue *queue )
return
ERROR_SUCCESS
;
}
void
stop_queue
(
struct
queue
*
queue
)
{
if
(
!
queue
->
pool
)
return
;
CloseThreadpool
(
queue
->
pool
);
queue
->
pool
=
NULL
;
TRACE
(
"stopped %p
\n
"
,
queue
);
}
static
DWORD
queue_task
(
struct
queue
*
queue
,
PTP_WORK_CALLBACK
task
,
void
*
ctx
)
{
TP_WORK
*
work
;
...
...
@@ -3037,8 +3045,8 @@ static void socket_destroy( struct object_header *hdr )
TRACE
(
"%p
\n
"
,
socket
);
if
(
socket
->
send_q
.
pool
)
CloseThreadpool
(
socket
->
send_q
.
pool
);
if
(
socket
->
recv_q
.
pool
)
CloseThreadpool
(
socket
->
recv_q
.
pool
);
stop_queue
(
&
socket
->
send_q
);
stop_queue
(
&
socket
->
recv_q
);
release_object
(
&
socket
->
request
->
hdr
);
heap_free
(
socket
);
...
...
@@ -3526,6 +3534,7 @@ static DWORD socket_shutdown( struct socket *socket, USHORT status, const void *
struct
netconn
*
netconn
=
socket
->
request
->
netconn
;
DWORD
ret
;
stop_queue
(
&
socket
->
send_q
);
if
(
!
(
ret
=
send_frame
(
netconn
,
SOCKET_OPCODE_CLOSE
,
status
,
reason
,
len
,
TRUE
)))
{
socket
->
state
=
SOCKET_STATE_SHUTDOWN
;
...
...
@@ -3609,6 +3618,7 @@ static DWORD socket_close( struct socket *socket, USHORT status, const void *rea
if
(
socket
->
state
<
SOCKET_STATE_SHUTDOWN
)
{
stop_queue
(
&
socket
->
send_q
);
if
((
ret
=
send_frame
(
netconn
,
SOCKET_OPCODE_CLOSE
,
status
,
reason
,
len
,
TRUE
)))
goto
done
;
socket
->
state
=
SOCKET_STATE_SHUTDOWN
;
}
...
...
dlls/winhttp/session.c
View file @
97f9dc7f
...
...
@@ -578,7 +578,7 @@ static void request_destroy( struct object_header *hdr )
TRACE
(
"%p
\n
"
,
request
);
if
(
request
->
queue
.
pool
)
CloseThreadpool
(
request
->
queue
.
pool
);
stop_queue
(
&
request
->
queue
);
release_object
(
&
request
->
connect
->
hdr
);
if
(
request
->
cred_handle_initialized
)
FreeCredentialsHandle
(
&
request
->
cred_handle
);
...
...
dlls/winhttp/winhttp_private.h
View file @
97f9dc7f
...
...
@@ -317,6 +317,7 @@ BOOL free_handle( HINTERNET ) DECLSPEC_HIDDEN;
void
send_callback
(
struct
object_header
*
,
DWORD
,
LPVOID
,
DWORD
)
DECLSPEC_HIDDEN
;
void
close_connection
(
struct
request
*
)
DECLSPEC_HIDDEN
;
void
stop_queue
(
struct
queue
*
)
DECLSPEC_HIDDEN
;
void
netconn_close
(
struct
netconn
*
)
DECLSPEC_HIDDEN
;
DWORD
netconn_create
(
struct
hostdata
*
,
const
struct
sockaddr_storage
*
,
int
,
struct
netconn
**
)
DECLSPEC_HIDDEN
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment