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
da6e7078
Commit
da6e7078
authored
Jan 29, 2024
by
Paul Gofman
Committed by
Alexandre Julliard
Feb 02, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Check if we have waiting asyncs in sock_dispatch_asyncs() before clearing POLLOUT.
parent
aac09982
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
sock.c
dlls/ws2_32/tests/sock.c
+12
-0
sock.c
server/sock.c
+1
-1
No files found.
dlls/ws2_32/tests/sock.c
View file @
da6e7078
...
...
@@ -3115,13 +3115,19 @@ struct send_udp_thread_param
static
DWORD
WINAPI
send_udp_thread
(
void
*
param
)
{
struct
send_udp_thread_param
*
p
=
param
;
static
const
TIMEVAL
timeout_zero
=
{
0
};
static
char
buf
[
256
];
fd_set
writefds
;
unsigned
int
i
;
int
ret
;
WaitForSingleObject
(
p
->
start_event
,
INFINITE
);
for
(
i
=
0
;
i
<
256
;
++
i
)
{
FD_ZERO
(
&
writefds
);
FD_SET
(
p
->
sock
,
&
writefds
);
ret
=
select
(
1
,
NULL
,
&
writefds
,
NULL
,
&
timeout_zero
);
ok
(
ret
==
1
,
"got %d, i %u.
\n
"
,
ret
,
i
);
ret
=
send
(
p
->
sock
,
buf
,
sizeof
(
buf
),
0
);
ok
(
ret
==
sizeof
(
buf
),
"got %d, error %u, i %u.
\n
"
,
ret
,
WSAGetLastError
(),
i
);
}
...
...
@@ -3135,6 +3141,7 @@ static void test_UDP(void)
possible that this test fails due to dropped packets. */
/* peer 0 receives data from all other peers */
static
const
TIMEVAL
timeout_zero
=
{
0
};
struct
sock_info
peer
[
NUM_UDP_PEERS
];
char
buf
[
16
];
int
ss
,
i
,
n_recv
,
n_sent
,
ret
;
...
...
@@ -3142,6 +3149,7 @@ static void test_UDP(void)
int
sock
;
struct
send_udp_thread_param
udp_thread_param
;
HANDLE
thread
;
fd_set
writefds
;
memset
(
buf
,
0
,
sizeof
(
buf
));
...
...
@@ -3211,6 +3219,10 @@ static void test_UDP(void)
{
ret
=
send
(
sock
,
buf
,
sizeof
(
buf
),
0
);
ok
(
ret
==
sizeof
(
buf
),
"got %d, error %u, i %u.
\n
"
,
ret
,
WSAGetLastError
(),
i
);
FD_ZERO
(
&
writefds
);
FD_SET
(
sock
,
&
writefds
);
ret
=
select
(
1
,
NULL
,
&
writefds
,
NULL
,
&
timeout_zero
);
ok
(
ret
==
1
,
"got %d, i %u.
\n
"
,
ret
,
i
);
}
WaitForSingleObject
(
thread
,
INFINITE
);
CloseHandle
(
thread
);
...
...
server/sock.c
View file @
da6e7078
...
...
@@ -1231,7 +1231,7 @@ static int sock_dispatch_asyncs( struct sock *sock, int event, int error )
event
&=
~
(
POLLIN
|
POLLPRI
);
}
if
((
event
&
POLLOUT
)
&&
async_queue
d
(
&
sock
->
write_q
))
if
((
event
&
POLLOUT
)
&&
async_queue
_has_waiting_asyncs
(
&
sock
->
write_q
))
{
if
(
async_waiting
(
&
sock
->
write_q
))
{
...
...
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