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
4133fb43
Commit
4133fb43
authored
Jul 30, 2013
by
Bruno Jesus
Committed by
Alexandre Julliard
Jul 30, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32/tests: Add SO_ACCEPTCONN tests.
parent
c897306d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
sock.c
dlls/ws2_32/tests/sock.c
+9
-2
No files found.
dlls/ws2_32/tests/sock.c
View file @
4133fb43
...
...
@@ -2460,7 +2460,7 @@ static void test_errors(void)
static
void
test_listen
(
void
)
{
SOCKET
fdA
,
fdB
;
int
ret
;
int
ret
,
acceptc
,
olen
=
sizeof
(
acceptc
)
;
struct
sockaddr_in
address
;
memset
(
&
address
,
0
,
sizeof
(
address
));
...
...
@@ -2507,9 +2507,17 @@ static void test_listen(void)
ok
(
bind
(
fdB
,
(
struct
sockaddr
*
)
&
address
,
sizeof
(
address
)),
"bind should have failed
\n
"
);
ok
(
ret
==
WSAEINVAL
,
"expected 10022, received %d
\n
"
,
ret
);
acceptc
=
0xdead
;
ok
(
!
getsockopt
(
fdA
,
SOL_SOCKET
,
SO_ACCEPTCONN
,
(
char
*
)
&
acceptc
,
&
olen
),
"getsockopt failed
\n
"
);
ok
(
acceptc
==
0
,
"SO_ACCEPTCONN should be 0, received %d
\n
"
,
acceptc
);
ok
(
!
listen
(
fdA
,
0
),
"listen failed
\n
"
);
ok
(
!
listen
(
fdA
,
SOMAXCONN
),
"double listen failed
\n
"
);
acceptc
=
0xdead
;
ok
(
!
getsockopt
(
fdA
,
SOL_SOCKET
,
SO_ACCEPTCONN
,
(
char
*
)
&
acceptc
,
&
olen
),
"getsockopt failed
\n
"
);
ok
(
acceptc
==
1
,
"SO_ACCEPTCONN should be 1, received %d
\n
"
,
acceptc
);
SetLastError
(
0xdeadbeef
);
ok
((
listen
(
fdB
,
SOMAXCONN
)
==
SOCKET_ERROR
),
"listen did not fail
\n
"
);
ret
=
WSAGetLastError
();
...
...
@@ -2521,7 +2529,6 @@ static void test_listen(void)
fdB
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
);
ok
((
fdB
!=
INVALID_SOCKET
),
"socket failed unexpectedly: %d
\n
"
,
WSAGetLastError
()
);
SetLastError
(
0xdeadbeef
);
ok
(
bind
(
fdB
,
(
struct
sockaddr
*
)
&
address
,
sizeof
(
address
)),
"bind should have failed
\n
"
);
ret
=
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