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
a549245d
Commit
a549245d
authored
Sep 13, 2016
by
Bruno Jesus
Committed by
Alexandre Julliard
Sep 14, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Fix handling of POLLHUP in WSAPoll.
Signed-off-by:
Bruno Jesus
<
00cpxxx@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
461bfc64
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
socket.c
dlls/ws2_32/socket.c
+14
-1
sock.c
dlls/ws2_32/tests/sock.c
+0
-2
No files found.
dlls/ws2_32/socket.c
View file @
a549245d
...
...
@@ -5378,7 +5378,20 @@ int WINAPI WSAPoll(WSAPOLLFD *wfds, ULONG count, int timeout)
if
(
ufds
[
i
].
fd
!=
-
1
)
{
release_sock_fd
(
wfds
[
i
].
fd
,
ufds
[
i
].
fd
);
wfds
[
i
].
revents
=
convert_poll_u2w
(
ufds
[
i
].
revents
);
if
(
ufds
[
i
].
revents
&
POLLHUP
)
{
/* Check if the socket still exists */
int
fd
=
get_sock_fd
(
wfds
[
i
].
fd
,
0
,
NULL
);
if
(
fd
!=
-
1
)
{
wfds
[
i
].
revents
=
WS_POLLHUP
;
release_sock_fd
(
wfds
[
i
].
fd
,
fd
);
}
else
wfds
[
i
].
revents
=
WS_POLLNVAL
;
}
else
wfds
[
i
].
revents
=
convert_poll_u2w
(
ufds
[
i
].
revents
);
}
else
wfds
[
i
].
revents
=
WS_POLLNVAL
;
...
...
dlls/ws2_32/tests/sock.c
View file @
a549245d
...
...
@@ -6672,7 +6672,6 @@ static void test_WSAPoll(void)
POLL_SET
(
fdWrite
,
POLLIN
);
ret
=
pWSAPoll
(
fds
,
ix
,
poll_timeout
);
ok
(
ret
==
1
,
"expected 1, got %d
\n
"
,
ret
);
todo_wine
ok
(
POLL_ISSET
(
fdWrite
,
POLLHUP
),
"fdWrite socket events incorrect
\n
"
);
ret
=
recv
(
fdWrite
,
tmp_buf
,
sizeof
(
tmp_buf
),
0
);
ok
(
ret
==
0
,
"expected 0, got %d
\n
"
,
ret
);
...
...
@@ -6737,7 +6736,6 @@ todo_wine
POLL_SET
(
fdWrite
,
POLLIN
);
ret
=
pWSAPoll
(
fds
,
ix
,
poll_timeout
);
ok
(
ret
==
1
,
"expected 1, got %d
\n
"
,
ret
);
todo_wine
ok
(
POLL_ISSET
(
fdWrite
,
POLLNVAL
),
"fdWrite socket events incorrect
\n
"
);
WaitForSingleObject
(
thread_handle
,
1000
);
closesocket
(
fdRead
);
...
...
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