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
53210ceb
Commit
53210ceb
authored
May 12, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
May 13, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Clear FD_OOB instead of FD_READ when receiving OOB data.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
037fccc0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
socket.c
dlls/ws2_32/socket.c
+6
-6
sock.c
dlls/ws2_32/tests/sock.c
+1
-1
No files found.
dlls/ws2_32/socket.c
View file @
53210ceb
...
...
@@ -2110,14 +2110,14 @@ static NTSTATUS WS2_async_recv( void *user, IO_STATUS_BLOCK *iosb, NTSTATUS stat
if
(
result
>=
0
)
{
status
=
STATUS_SUCCESS
;
_enable_event
(
wsa
->
hSocket
,
FD_READ
,
0
,
0
);
_enable_event
(
wsa
->
hSocket
,
(
wsa
->
flags
&
WS_MSG_OOB
)
?
FD_OOB
:
FD_READ
,
0
,
0
);
}
else
{
if
(
errno
==
EAGAIN
)
{
status
=
STATUS_PENDING
;
_enable_event
(
wsa
->
hSocket
,
FD_READ
,
0
,
0
);
_enable_event
(
wsa
->
hSocket
,
(
wsa
->
flags
&
WS_MSG_OOB
)
?
FD_OOB
:
FD_READ
,
0
,
0
);
}
else
{
...
...
@@ -6180,7 +6180,7 @@ static int WS2_recv_base( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
}
else
NtQueueApcThread
(
GetCurrentThread
(),
(
PNTAPCFUNC
)
ws2_async_apc
,
(
ULONG_PTR
)
wsa
,
(
ULONG_PTR
)
iosb
,
0
);
_enable_event
(
SOCKET2HANDLE
(
s
),
FD_READ
,
0
,
0
);
_enable_event
(
SOCKET2HANDLE
(
s
),
(
wsa
->
flags
&
WS_MSG_OOB
)
?
FD_OOB
:
FD_READ
,
0
,
0
);
return
0
;
}
...
...
@@ -6209,13 +6209,13 @@ static int WS2_recv_base( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
{
err
=
WSAETIMEDOUT
;
/* a timeout is not fatal */
_enable_event
(
SOCKET2HANDLE
(
s
),
FD_READ
,
0
,
0
);
_enable_event
(
SOCKET2HANDLE
(
s
),
(
wsa
->
flags
&
WS_MSG_OOB
)
?
FD_OOB
:
FD_READ
,
0
,
0
);
goto
error
;
}
}
else
{
_enable_event
(
SOCKET2HANDLE
(
s
),
FD_READ
,
0
,
0
);
_enable_event
(
SOCKET2HANDLE
(
s
),
(
wsa
->
flags
&
WS_MSG_OOB
)
?
FD_OOB
:
FD_READ
,
0
,
0
);
err
=
WSAEWOULDBLOCK
;
goto
error
;
}
...
...
@@ -6224,7 +6224,7 @@ static int WS2_recv_base( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
TRACE
(
" -> %i bytes
\n
"
,
n
);
if
(
wsa
!=
&
localwsa
)
HeapFree
(
GetProcessHeap
(),
0
,
wsa
);
release_sock_fd
(
s
,
fd
);
_enable_event
(
SOCKET2HANDLE
(
s
),
FD_READ
,
0
,
0
);
_enable_event
(
SOCKET2HANDLE
(
s
),
(
wsa
->
flags
&
WS_MSG_OOB
)
?
FD_OOB
:
FD_READ
,
0
,
0
);
SetLastError
(
ERROR_SUCCESS
);
return
0
;
...
...
dlls/ws2_32/tests/sock.c
View file @
53210ceb
...
...
@@ -4413,7 +4413,7 @@ static void test_oob_events(struct event_test_ctx *ctx)
ret
=
recv
(
server
,
buffer
,
1
,
MSG_OOB
);
ok
(
ret
==
1
,
"got %d
\n
"
,
ret
);
check_events_todo
_msg
(
ctx
,
FD_OOB
,
0
,
200
);
check_events_todo
(
ctx
,
FD_OOB
,
0
,
200
);
check_events_todo_msg
(
ctx
,
0
,
0
,
0
);
ret
=
recv
(
server
,
buffer
,
1
,
MSG_OOB
);
...
...
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