Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
cdd24b1d
Commit
cdd24b1d
authored
May 13, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
May 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Use IOCTL_AFD_LISTEN.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6ccf61fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
22 deletions
+21
-22
socket.c
dlls/ws2_32/socket.c
+21
-22
No files found.
dlls/ws2_32/socket.c
View file @
cdd24b1d
...
...
@@ -4566,37 +4566,36 @@ int WINAPI WS_ioctlsocket(SOCKET s, LONG cmd, WS_u_long *argp)
return
WSAIoctl
(
s
,
cmd
,
argp
,
sizeof
(
WS_u_long
),
argp
,
sizeof
(
WS_u_long
),
&
ret_size
,
NULL
,
NULL
);
}
/***********************************************************************
*
listen (WS
2_32.13)
*
listen (ws
2_32.13)
*/
int
WINAPI
WS_listen
(
SOCKET
s
,
int
backlog
)
int
WINAPI
WS_listen
(
SOCKET
s
,
int
backlog
)
{
int
fd
=
get_sock_fd
(
s
,
FILE_READ_DATA
,
NULL
),
ret
=
SOCKET_ERROR
;
struct
afd_listen_params
params
=
{.
backlog
=
backlog
};
IO_STATUS_BLOCK
io
;
NTSTATUS
status
;
int
fd
,
bound
;
TRACE
(
"socket %04lx, backlog %d
\n
"
,
s
,
backlog
);
if
(
fd
!=
-
1
)
{
int
bound
=
is_fd_bound
(
fd
,
NULL
,
NULL
);
TRACE
(
"socket %#lx, backlog %d
\n
"
,
s
,
backlog
);
if
(
bound
<=
0
)
{
SetLastError
(
bound
==
-
1
?
wsaErrno
()
:
WSAEINVAL
);
}
else
if
(
listen
(
fd
,
backlog
)
==
0
)
{
_enable_event
(
SOCKET2HANDLE
(
s
),
FD_ACCEPT
,
FD_WINE_LISTENING
,
FD_CONNECT
|
FD_WINE_CONNECTED
);
ret
=
0
;
}
else
SetLastError
(
wsaErrno
());
release_sock_fd
(
s
,
fd
);
if
((
fd
=
get_sock_fd
(
s
,
FILE_READ_DATA
,
NULL
))
==
-
1
)
return
-
1
;
bound
=
is_fd_bound
(
fd
,
NULL
,
NULL
);
release_sock_fd
(
s
,
fd
);
if
(
bound
<=
0
)
{
SetLastError
(
bound
?
wsaErrno
()
:
WSAEINVAL
);
return
-
1
;
}
return
ret
;
status
=
NtDeviceIoControlFile
(
SOCKET2HANDLE
(
s
),
NULL
,
NULL
,
NULL
,
&
io
,
IOCTL_AFD_LISTEN
,
&
params
,
sizeof
(
params
),
NULL
,
0
);
SetLastError
(
NtStatusToWSAError
(
status
)
);
return
status
?
-
1
:
0
;
}
/***********************************************************************
* recv (WS2_32.16)
*/
...
...
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