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
8eed10c5
Commit
8eed10c5
authored
Jun 23, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 23, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Use IOCTL_AFD_WINE_GET_SO_ACCEPTCONN.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
697f9e97
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
15 deletions
+17
-15
socket.c
dlls/ws2_32/socket.c
+17
-15
No files found.
dlls/ws2_32/socket.c
View file @
8eed10c5
...
@@ -2063,6 +2063,19 @@ int WINAPI WS_getsockname( SOCKET s, struct WS_sockaddr *addr, int *len )
...
@@ -2063,6 +2063,19 @@ int WINAPI WS_getsockname( SOCKET s, struct WS_sockaddr *addr, int *len )
return
status
?
-
1
:
0
;
return
status
?
-
1
:
0
;
}
}
static
int
server_getsockopt
(
SOCKET
s
,
ULONG
code
,
char
*
optval
,
int
*
optlen
)
{
IO_STATUS_BLOCK
io
;
NTSTATUS
status
;
status
=
NtDeviceIoControlFile
(
(
HANDLE
)
s
,
NULL
,
NULL
,
NULL
,
&
io
,
code
,
NULL
,
0
,
optval
,
*
optlen
);
if
(
!
status
)
*
optlen
=
io
.
Information
;
SetLastError
(
NtStatusToWSAError
(
status
)
);
return
status
?
-
1
:
0
;
}
/***********************************************************************
/***********************************************************************
* getsockopt (WS2_32.7)
* getsockopt (WS2_32.7)
*/
*/
...
@@ -2082,6 +2095,9 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level,
...
@@ -2082,6 +2095,9 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level,
{
{
switch
(
optname
)
switch
(
optname
)
{
{
case
WS_SO_ACCEPTCONN
:
return
server_getsockopt
(
s
,
IOCTL_AFD_WINE_GET_SO_ACCEPTCONN
,
optval
,
optlen
);
/* Handle common cases. The special cases are below, sorted
/* Handle common cases. The special cases are below, sorted
* alphabetically */
* alphabetically */
case
WS_SO_BROADCAST
:
case
WS_SO_BROADCAST
:
...
@@ -2101,21 +2117,7 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level,
...
@@ -2101,21 +2117,7 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level,
}
}
release_sock_fd
(
s
,
fd
);
release_sock_fd
(
s
,
fd
);
return
ret
;
return
ret
;
case
WS_SO_ACCEPTCONN
:
if
(
(
fd
=
get_sock_fd
(
s
,
0
,
NULL
))
==
-
1
)
return
SOCKET_ERROR
;
if
(
getsockopt
(
fd
,
SOL_SOCKET
,
SO_ACCEPTCONN
,
optval
,
(
socklen_t
*
)
optlen
)
!=
0
)
{
SetLastError
(
wsaErrno
());
ret
=
SOCKET_ERROR
;
}
else
{
/* BSD returns != 0 while Windows return exact == 1 */
if
(
*
(
int
*
)
optval
)
*
(
int
*
)
optval
=
1
;
}
release_sock_fd
(
s
,
fd
);
return
ret
;
case
WS_SO_BSP_STATE
:
case
WS_SO_BSP_STATE
:
{
{
CSADDR_INFO
*
csinfo
=
(
CSADDR_INFO
*
)
optval
;
CSADDR_INFO
*
csinfo
=
(
CSADDR_INFO
*
)
optval
;
...
...
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