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
843ef11e
Commit
843ef11e
authored
May 08, 2014
by
Bruno Jesus
Committed by
Alexandre Julliard
May 09, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Return the correct error if SO_REUSEADDR is set in bind error.
parent
473a3a47
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
socket.c
dlls/ws2_32/socket.c
+14
-0
sock.c
dlls/ws2_32/tests/sock.c
+0
-1
No files found.
dlls/ws2_32/socket.c
View file @
843ef11e
...
...
@@ -2682,6 +2682,20 @@ int WINAPI WS_bind(SOCKET s, const struct WS_sockaddr* name, int namelen)
case
EADDRNOTAVAIL
:
SetLastError
(
WSAEINVAL
);
break
;
case
EADDRINUSE
:
{
int
optval
=
0
;
socklen_t
optlen
=
sizeof
(
optval
);
/* Windows >= 2003 will return different results depending on
* SO_REUSEADDR, WSAEACCES may be returned representing that
* the socket hijacking protection prevented the bind */
if
(
!
getsockopt
(
fd
,
SOL_SOCKET
,
SO_REUSEADDR
,
(
char
*
)
&
optval
,
&
optlen
)
&&
optval
)
{
SetLastError
(
WSAEACCES
);
break
;
}
/* fall through */
}
default:
SetLastError
(
wsaErrno
());
break
;
...
...
dlls/ws2_32/tests/sock.c
View file @
843ef11e
...
...
@@ -1529,7 +1529,6 @@ static void test_so_reuseaddr(void)
{
trace
(
">= Win 2003 behavior of SO_REUSEADDR
\n
"
);
err
=
WSAGetLastError
();
todo_wine
ok
(
err
==
WSAEACCES
,
"expected 10013, got %d
\n
"
,
err
);
closesocket
(
s1
);
...
...
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