Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
66ff3594
Commit
66ff3594
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: Fix dwResult field in websocket receive error result.
Signed-off-by:
Paul Gofman
<
pgofman@codeweavers.com
>
parent
3d199dd9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
17 deletions
+20
-17
request.c
dlls/winhttp/request.c
+20
-17
No files found.
dlls/winhttp/request.c
View file @
66ff3594
...
...
@@ -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
,
...
...
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