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
cac21259
Commit
cac21259
authored
Jul 15, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Jul 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Map AFD_POLL_RESET to the "read" set in select().
parent
7b77b4e3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
socket.c
dlls/ws2_32/socket.c
+10
-7
No files found.
dlls/ws2_32/socket.c
View file @
cac21259
...
...
@@ -2709,6 +2709,10 @@ static int add_fd_to_set( SOCKET fd, struct fd_set *set )
int
WINAPI
select
(
int
count
,
fd_set
*
read_ptr
,
fd_set
*
write_ptr
,
fd_set
*
except_ptr
,
const
struct
timeval
*
timeout
)
{
static
const
int
read_flags
=
AFD_POLL_READ
|
AFD_POLL_ACCEPT
|
AFD_POLL_HUP
|
AFD_POLL_RESET
;
static
const
int
write_flags
=
AFD_POLL_WRITE
;
static
const
int
except_flags
=
AFD_POLL_OOB
|
AFD_POLL_CONNECT_ERR
;
struct
fd_set
*
read_input
=
NULL
;
struct
afd_poll_params
*
params
;
unsigned
int
poll_count
=
0
;
...
...
@@ -2760,7 +2764,7 @@ int WINAPI select( int count, fd_set *read_ptr, fd_set *write_ptr,
for
(
i
=
0
;
i
<
read_ptr
->
fd_count
;
++
i
)
{
params
->
sockets
[
params
->
count
].
socket
=
read_ptr
->
fd_array
[
i
];
params
->
sockets
[
params
->
count
].
flags
=
AFD_POLL_READ
|
AFD_POLL_ACCEPT
|
AFD_POLL_HUP
;
params
->
sockets
[
params
->
count
].
flags
=
read_flags
;
++
params
->
count
;
poll_socket
=
read_ptr
->
fd_array
[
i
];
}
...
...
@@ -2771,7 +2775,7 @@ int WINAPI select( int count, fd_set *read_ptr, fd_set *write_ptr,
for
(
i
=
0
;
i
<
write_ptr
->
fd_count
;
++
i
)
{
params
->
sockets
[
params
->
count
].
socket
=
write_ptr
->
fd_array
[
i
];
params
->
sockets
[
params
->
count
].
flags
=
AFD_POLL_WRITE
;
params
->
sockets
[
params
->
count
].
flags
=
write_flags
;
++
params
->
count
;
poll_socket
=
write_ptr
->
fd_array
[
i
];
}
...
...
@@ -2782,7 +2786,7 @@ int WINAPI select( int count, fd_set *read_ptr, fd_set *write_ptr,
for
(
i
=
0
;
i
<
except_ptr
->
fd_count
;
++
i
)
{
params
->
sockets
[
params
->
count
].
socket
=
except_ptr
->
fd_array
[
i
];
params
->
sockets
[
params
->
count
].
flags
=
AFD_POLL_OOB
|
AFD_POLL_CONNECT_ERR
;
params
->
sockets
[
params
->
count
].
flags
=
except_flags
;
++
params
->
count
;
poll_socket
=
except_ptr
->
fd_array
[
i
];
}
...
...
@@ -2819,8 +2823,7 @@ int WINAPI select( int count, fd_set *read_ptr, fd_set *write_ptr,
{
for
(
j
=
0
;
j
<
read_input
->
fd_count
;
++
j
)
{
if
(
read_input
->
fd_array
[
j
]
==
s
&&
(
flags
&
(
AFD_POLL_READ
|
AFD_POLL_ACCEPT
|
AFD_POLL_HUP
|
AFD_POLL_CLOSE
)))
if
(
read_input
->
fd_array
[
j
]
==
s
&&
(
flags
&
(
read_flags
|
AFD_POLL_CLOSE
)))
{
ret_count
+=
add_fd_to_set
(
s
,
read_ptr
);
flags
&=
~
AFD_POLL_CLOSE
;
...
...
@@ -2831,10 +2834,10 @@ int WINAPI select( int count, fd_set *read_ptr, fd_set *write_ptr,
if
(
flags
&
AFD_POLL_CLOSE
)
status
=
STATUS_INVALID_HANDLE
;
if
(
flags
&
AFD_POLL_WRITE
)
if
(
flags
&
write_flags
)
ret_count
+=
add_fd_to_set
(
s
,
write_ptr
);
if
(
flags
&
(
AFD_POLL_OOB
|
AFD_POLL_CONNECT_ERR
)
)
if
(
flags
&
except_flags
)
ret_count
+=
add_fd_to_set
(
s
,
except_ptr
);
}
}
...
...
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