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
fb3956fc
Commit
fb3956fc
authored
Jun 24, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 24, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Use IOCTL_AFD_WINE_GET_SO_ERROR.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8211c3ab
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
42 deletions
+1
-42
socket.c
dlls/ws2_32/socket.c
+1
-40
sock.c
dlls/ws2_32/tests/sock.c
+0
-2
No files found.
dlls/ws2_32/socket.c
View file @
fb3956fc
...
...
@@ -694,19 +694,6 @@ static inline void release_sock_fd( SOCKET s, int fd )
close
(
fd
);
}
static
void
_get_sock_errors
(
SOCKET
s
,
int
*
events
)
{
SERVER_START_REQ
(
get_socket_event
)
{
req
->
handle
=
wine_server_obj_handle
(
SOCKET2HANDLE
(
s
)
);
req
->
service
=
FALSE
;
req
->
c_event
=
0
;
wine_server_set_reply
(
req
,
events
,
sizeof
(
int
)
*
FD_MAX_EVENTS
);
wine_server_call
(
req
);
}
SERVER_END_REQ
;
}
static
int
_get_fd_type
(
int
fd
)
{
int
sock_type
=
-
1
;
...
...
@@ -2236,33 +2223,7 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level,
return
0
;
case
WS_SO_ERROR
:
{
if
(
(
fd
=
get_sock_fd
(
s
,
0
,
NULL
))
==
-
1
)
return
SOCKET_ERROR
;
if
(
getsockopt
(
fd
,
SOL_SOCKET
,
SO_ERROR
,
optval
,
(
socklen_t
*
)
optlen
)
!=
0
)
{
SetLastError
(
wsaErrno
());
ret
=
SOCKET_ERROR
;
}
release_sock_fd
(
s
,
fd
);
/* The wineserver may have swallowed the error before us */
if
(
!
ret
&&
*
(
int
*
)
optval
==
0
)
{
int
i
,
events
[
FD_MAX_EVENTS
];
_get_sock_errors
(
s
,
events
);
for
(
i
=
0
;
i
<
FD_MAX_EVENTS
;
i
++
)
{
if
(
events
[
i
])
{
TRACE
(
"returning SO_ERROR %d from wine server
\n
"
,
events
[
i
]);
*
(
int
*
)
optval
=
events
[
i
];
break
;
}
}
}
return
ret
;
}
return
server_getsockopt
(
s
,
IOCTL_AFD_WINE_GET_SO_ERROR
,
optval
,
optlen
);
case
WS_SO_LINGER
:
{
...
...
dlls/ws2_32/tests/sock.c
View file @
fb3956fc
...
...
@@ -1295,7 +1295,6 @@ todo_wine
SetLastError
(
0xdeadbeef
);
i
=
4321
;
err
=
getsockopt
(
s
,
SOL_SOCKET
,
SO_ERROR
,
(
char
*
)
&
i
,
&
size
);
todo_wine
ok
(
!
err
&&
!
WSAGetLastError
(),
"got %d with %d (expected 0 with 0)
\n
"
,
err
,
WSAGetLastError
());
...
...
@@ -1306,7 +1305,6 @@ todo_wine
SetLastError
(
0xdeadbeef
);
size
=
1
;
err
=
getsockopt
(
s
,
SOL_SOCKET
,
SO_ERROR
,
(
char
*
)
&
i
,
&
size
);
todo_wine
ok
(
(
err
==
SOCKET_ERROR
)
&&
(
WSAGetLastError
()
==
WSAEFAULT
),
"got %d with %d (expected SOCKET_ERROR with WSAEFAULT)
\n
"
,
err
,
WSAGetLastError
());
...
...
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