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
5d2f2797
Commit
5d2f2797
authored
Jun 06, 2022
by
Paul Gofman
Committed by
Alexandre Julliard
Jun 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Keep task in queue until completion.
Signed-off-by:
Paul Gofman
<
pgofman@codeweavers.com
>
parent
5dee0ed7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
request.c
dlls/winhttp/request.c
+7
-6
No files found.
dlls/winhttp/request.c
View file @
5d2f2797
...
@@ -135,15 +135,16 @@ void stop_queue( struct queue *queue )
...
@@ -135,15 +135,16 @@ void stop_queue( struct queue *queue )
TRACE
(
"stopped %p
\n
"
,
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
;
struct
list
*
entry
;
AcquireSRWLockExclusive
(
&
queue
->
lock
);
AcquireSRWLockExclusive
(
&
queue
->
lock
);
assert
(
queue
->
callback_running
);
assert
(
queue
->
callback_running
);
if
((
entry
=
list_head
(
&
queue
->
queued_tasks
)))
if
(
prev_task
)
list_remove
(
entry
);
list_remove
(
&
prev_task
->
entry
);
else
if
(
!
(
entry
=
list_head
(
&
queue
->
queued_tasks
)))
queue
->
callback_running
=
FALSE
;
queue
->
callback_running
=
FALSE
;
ReleaseSRWLockExclusive
(
&
queue
->
lock
);
ReleaseSRWLockExclusive
(
&
queue
->
lock
);
if
(
!
entry
)
return
NULL
;
if
(
!
entry
)
return
NULL
;
...
@@ -157,12 +158,12 @@ static void CALLBACK task_callback( TP_CALLBACK_INSTANCE *instance, void *ctx )
...
@@ -157,12 +158,12 @@ static void CALLBACK task_callback( TP_CALLBACK_INSTANCE *instance, void *ctx )
TRACE
(
"instance %p.
\n
"
,
instance
);
TRACE
(
"instance %p.
\n
"
,
instance
);
task
=
get_next_task
(
queue
);
task
=
get_next_task
(
queue
,
NULL
);
while
(
task
)
while
(
task
)
{
{
task
->
callback
(
task
);
task
->
callback
(
task
);
/* Queue object may be freed by release_object() unless there is another task referencing it. */
/* 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
);
release_object
(
task
->
obj
);
free
(
task
);
free
(
task
);
task
=
next_task
;
task
=
next_task
;
...
...
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