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
459837ec
Commit
459837ec
authored
Nov 27, 2014
by
Piotr Caban
Committed by
Alexandre Julliard
Nov 28, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Add support for overlapping fd_sets in select.
parent
c24fe225
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
socket.c
dlls/ws2_32/socket.c
+15
-6
No files found.
dlls/ws2_32/socket.c
View file @
459837ec
...
...
@@ -4386,27 +4386,36 @@ static void release_poll_fds( const WS_fd_set *readfds, const WS_fd_set *writefd
static
int
get_poll_results
(
WS_fd_set
*
readfds
,
WS_fd_set
*
writefds
,
WS_fd_set
*
exceptfds
,
const
struct
pollfd
*
fds
)
{
unsigned
int
exceptfds_off
=
(
readfds
?
readfds
->
fd_count
:
0
)
+
(
writefds
?
writefds
->
fd_count
:
0
);
unsigned
int
i
,
j
=
0
,
k
,
total
=
0
;
if
(
readfds
)
{
for
(
i
=
k
=
0
;
i
<
readfds
->
fd_count
;
i
++
,
j
++
)
if
(
fds
[
j
].
revents
)
readfds
->
fd_array
[
k
++
]
=
readfds
->
fd_array
[
i
];
{
if
(
fds
[
j
].
revents
||
(
readfds
==
writefds
&&
(
fds
[
readfds
->
fd_count
+
i
].
revents
&
POLLOUT
)
&&
!
(
fds
[
readfds
->
fd_count
+
i
].
revents
&
POLLHUP
))
||
(
readfds
==
exceptfds
&&
fds
[
exceptfds_off
+
i
].
revents
))
readfds
->
fd_array
[
k
++
]
=
readfds
->
fd_array
[
i
];
}
readfds
->
fd_count
=
k
;
total
+=
k
;
}
if
(
writefds
)
if
(
writefds
&&
writefds
!=
readfds
)
{
for
(
i
=
k
=
0
;
i
<
writefds
->
fd_count
;
i
++
,
j
++
)
if
((
fds
[
j
].
revents
&
POLLOUT
)
&&
!
(
fds
[
j
].
revents
&
POLLHUP
))
if
(((
fds
[
j
].
revents
&
POLLOUT
)
&&
!
(
fds
[
j
].
revents
&
POLLHUP
))
||
(
writefds
==
exceptfds
&&
fds
[
exceptfds_off
+
i
].
revents
))
writefds
->
fd_array
[
k
++
]
=
writefds
->
fd_array
[
i
];
writefds
->
fd_count
=
k
;
total
+=
k
;
}
if
(
exceptfds
)
if
(
exceptfds
&&
exceptfds
!=
readfds
&&
exceptfds
!=
writefds
)
{
for
(
i
=
k
=
0
;
i
<
exceptfds
->
fd_count
;
i
++
,
j
++
)
if
(
fds
[
j
].
revents
)
exceptfds
->
fd_array
[
k
++
]
=
exceptfds
->
fd_array
[
i
];
for
(
i
=
k
=
0
;
i
<
exceptfds
->
fd_count
;
i
++
)
if
(
fds
[
exceptfds_off
+
i
].
revents
)
exceptfds
->
fd_array
[
k
++
]
=
exceptfds
->
fd_array
[
i
];
exceptfds
->
fd_count
=
k
;
total
+=
k
;
}
...
...
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