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
998febf7
Commit
998febf7
authored
Sep 18, 2023
by
Ally Sommers
Committed by
Alexandre Julliard
Sep 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Return WSAEOPNOTSUPP on listen() if the socket's type is SOCK_DGRAM.
parent
bf6f255c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
sock.c
dlls/ws2_32/tests/sock.c
+12
-0
sock.c
server/sock.c
+6
-0
No files found.
dlls/ws2_32/tests/sock.c
View file @
998febf7
...
...
@@ -3945,6 +3945,18 @@ static void test_listen(void)
ret
=
WSAGetLastError
();
ok
(
ret
==
WSAENOTSOCK
,
"expected 10038, received %d
\n
"
,
ret
);
/* udp test */
SetLastError
(
0xdeadbeef
);
fdA
=
socket
(
AF_INET
,
SOCK_DGRAM
,
0
);
ok
((
fdA
!=
INVALID_SOCKET
),
"socket failed unexpectedly: %d
\n
"
,
WSAGetLastError
()
);
ok
((
listen
(
fdA
,
1
)
==
SOCKET_ERROR
),
"listen did not fail
\n
"
);
ret
=
WSAGetLastError
();
ok
(
ret
==
WSAEOPNOTSUPP
,
"expected 10045, received %d
\n
"
,
ret
);
ret
=
closesocket
(
fdA
);
ok
(
ret
==
0
,
"closesocket failed unexpectedly: %d
\n
"
,
ret
);
/* tcp tests */
fdA
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
);
ok
((
fdA
!=
INVALID_SOCKET
),
"socket failed unexpectedly: %d
\n
"
,
WSAGetLastError
()
);
...
...
server/sock.c
View file @
998febf7
...
...
@@ -2533,6 +2533,12 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
return
;
}
if
(
sock
->
type
==
WS_SOCK_DGRAM
)
{
set_error
(
STATUS_NOT_SUPPORTED
);
return
;
}
if
(
!
sock
->
bound
)
{
set_error
(
STATUS_INVALID_PARAMETER
);
...
...
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