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
2677546e
Commit
2677546e
authored
Dec 19, 2022
by
Paul Gofman
Committed by
Alexandre Julliard
Dec 20, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Handle state in a single switch in receive_response().
parent
940d13db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
22 deletions
+23
-22
request.c
dlls/winhttp/request.c
+23
-22
No files found.
dlls/winhttp/request.c
View file @
2677546e
...
...
@@ -2871,38 +2871,39 @@ static DWORD receive_response( struct request *request )
{
BOOL
async_mode
=
request
->
connect
->
hdr
.
flags
&
WINHTTP_FLAG_ASYNC
;
DWORD
ret
,
size
,
query
,
status
;
BOOL
return_to_send
;
TRACE
(
"request state %d.
\n
"
,
request
->
state
);
if
(
request
->
state
>=
REQUEST_RESPONSE_STATE_RESPONSE_RECEIVED
)
{
ret
=
ERROR_WINHTTP_INCORRECT_HANDLE_STATE
;
goto
done
;
}
if
(
request
->
state
==
REQUEST_RESPONSE_RECURSIVE_REQUEST
)
switch
(
request
->
state
)
{
case
REQUEST_RESPONSE_RECURSIVE_REQUEST
:
TRACE
(
"Sending request.
\n
"
);
if
((
ret
=
send_request
(
request
,
NULL
,
0
,
request
->
optional
,
request
->
optional_len
,
0
,
0
,
FALSE
)))
goto
done
;
}
return_to_send
=
async_mode
&&
request
->
state
==
REQUEST_RESPONSE_STATE_SENDING_REQUEST
;
if
(
request
->
state
<
REQUEST_RESPONSE_STATE_REQUEST_SENT
&&
!
return_to_send
)
{
ret
=
ERROR_WINHTTP_INCORRECT_HANDLE_STATE
;
goto
done
;
}
if
(
request
->
state
==
REQUEST_RESPONSE_STATE_READ_RESPONSE_QUEUED_REQUEST_SENT
)
request
->
state
=
REQUEST_RESPONSE_STATE_REQUEST_SENT
;
else
send_callback
(
&
request
->
hdr
,
WINHTTP_CALLBACK_STATUS_RECEIVING_RESPONSE
,
NULL
,
0
);
break
;
if
(
return_to_send
)
{
case
REQUEST_RESPONSE_STATE_SENDING_REQUEST
:
if
(
!
async_mode
)
{
ret
=
ERROR_WINHTTP_INCORRECT_HANDLE_STATE
;
goto
done
;
}
send_callback
(
&
request
->
hdr
,
WINHTTP_CALLBACK_STATUS_RECEIVING_RESPONSE
,
NULL
,
0
);
request
->
state
=
REQUEST_RESPONSE_STATE_READ_RESPONSE_QUEUED
;
return
queue_receive_response
(
request
);
case
REQUEST_RESPONSE_STATE_REQUEST_SENT
:
send_callback
(
&
request
->
hdr
,
WINHTTP_CALLBACK_STATUS_RECEIVING_RESPONSE
,
NULL
,
0
);
break
;
case
REQUEST_RESPONSE_STATE_READ_RESPONSE_QUEUED_REQUEST_SENT
:
request
->
state
=
REQUEST_RESPONSE_STATE_REQUEST_SENT
;
break
;
default:
ret
=
ERROR_WINHTTP_INCORRECT_HANDLE_STATE
;
goto
done
;
}
send_callback
(
&
request
->
hdr
,
WINHTTP_CALLBACK_STATUS_RESPONSE_RECEIVED
,
...
...
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