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
ee03ed09
Commit
ee03ed09
authored
Jun 09, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 09, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Use IOCTL_AFD_WINE_COMPLETE_ASYNC for unimplemented ioctls.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
dddd4662
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
18 deletions
+31
-18
socket.c
dlls/ws2_32/socket.c
+19
-9
sock.c
dlls/ws2_32/tests/sock.c
+12
-9
No files found.
dlls/ws2_32/socket.c
View file @
ee03ed09
...
...
@@ -3491,16 +3491,9 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
return
ret
?
-
1
:
0
;
}
case
WS_SIO_SET_COMPATIBILITY_MODE
:
TRACE
(
"WS_SIO_SET_COMPATIBILITY_MODE ignored
\n
"
);
status
=
WSAEOPNOTSUPP
;
break
;
case
WS_SIO_UDP_CONNRESET
:
FIXME
(
"WS_SIO_UDP_CONNRESET stub
\n
"
);
break
;
case
0x667e
:
/* Netscape tries hard to use bogus ioctl 0x667e */
SetLastError
(
WSAEOPNOTSUPP
);
return
SOCKET_ERROR
;
case
WS_SIO_ADDRESS_LIST_CHANGE
:
{
...
...
@@ -3515,8 +3508,25 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
default:
FIXME
(
"unimplemented ioctl %s
\n
"
,
debugstr_wsaioctl
(
code
)
);
status
=
WSAEOPNOTSUPP
;
break
;
/* fall through */
case
LOWORD
(
WS_FIONBIO
):
/* Netscape tries to use this */
case
WS_SIO_SET_COMPATIBILITY_MODE
:
{
NTSTATUS
status
=
STATUS_NOT_SUPPORTED
;
server_ioctl_sock
(
s
,
IOCTL_AFD_WINE_COMPLETE_ASYNC
,
&
status
,
sizeof
(
status
),
NULL
,
0
,
ret_size
,
overlapped
,
completion
);
if
(
overlapped
)
{
SetLastError
(
ERROR_IO_PENDING
);
}
else
{
*
ret_size
=
0
;
SetLastError
(
WSAEOPNOTSUPP
);
}
return
-
1
;
}
}
if
(
completion
)
...
...
dlls/ws2_32/tests/sock.c
View file @
ee03ed09
...
...
@@ -4139,7 +4139,7 @@ static void test_unsupported_ioctls(void)
ok
(
ret
==
-
1
,
"expected failure
\n
"
);
todo_wine_if
(
codes
[
i
]
==
FIOASYNC
||
codes
[
i
]
==
SIO_FLUSH
)
ok
(
WSAGetLastError
()
==
WSAEOPNOTSUPP
,
"got error %u
\n
"
,
WSAGetLastError
());
todo_wine_if
(
codes
[
i
]
!=
SIO_FLUSH
)
todo_wine_if
(
codes
[
i
]
==
FIOASYNC
)
ok
(
!
size
,
"got size %u
\n
"
,
size
);
WSASetLastError
(
0xdeadbeef
);
...
...
@@ -4149,24 +4149,25 @@ static void test_unsupported_ioctls(void)
ret
=
WSAIoctl
(
s
,
codes
[
i
],
NULL
,
0
,
NULL
,
0
,
&
size
,
&
overlapped
,
NULL
);
todo_wine_if
(
codes
[
i
]
==
SIO_FLUSH
)
ok
(
ret
==
-
1
,
"expected failure
\n
"
);
todo_wine
ok
(
WSAGetLastError
()
==
ERROR_IO_PENDING
,
"got error %u
\n
"
,
WSAGetLastError
());
todo_wine_if
(
codes
[
i
]
==
FIOASYNC
||
codes
[
i
]
==
SIO_FLUSH
)
ok
(
WSAGetLastError
()
==
ERROR_IO_PENDING
,
"got error %u
\n
"
,
WSAGetLastError
());
todo_wine_if
(
codes
[
i
]
==
SIO_FLUSH
)
ok
(
size
==
0xdeadbeef
,
"got size %u
\n
"
,
size
);
ret
=
GetQueuedCompletionStatus
(
port
,
&
size
,
&
key
,
&
overlapped_ptr
,
0
);
todo_wine_if
(
codes
[
i
]
==
SIO_FLUSH
)
ok
(
!
ret
,
"expected failure
\n
"
);
todo_wine_if
(
codes
[
i
]
!=
0xdeadbeef
)
todo_wine_if
(
codes
[
i
]
==
FIOASYNC
||
codes
[
i
]
==
SIO_FLUSH
)
ok
(
GetLastError
()
==
ERROR_NOT_SUPPORTED
,
"got error %u
\n
"
,
GetLastError
());
todo_wine_if
(
codes
[
i
]
==
FIOASYNC
||
codes
[
i
]
==
0x667e
)
todo_wine_if
(
codes
[
i
]
==
FIOASYNC
)
ok
(
!
size
,
"got size %u
\n
"
,
size
);
ok
(
key
==
123
,
"got key %Iu
\n
"
,
key
);
todo_wine_if
(
codes
[
i
]
==
FIOASYNC
||
codes
[
i
]
==
0x667e
)
todo_wine_if
(
codes
[
i
]
==
FIOASYNC
)
ok
(
overlapped_ptr
==
&
overlapped
,
"got overlapped %p
\n
"
,
overlapped_ptr
);
todo_wine_if
(
codes
[
i
]
!=
0xdeadbeef
)
todo_wine_if
(
codes
[
i
]
==
FIOASYNC
||
codes
[
i
]
==
SIO_FLUSH
)
ok
((
NTSTATUS
)
overlapped
.
Internal
==
STATUS_NOT_SUPPORTED
,
"got status %#x
\n
"
,
(
NTSTATUS
)
overlapped
.
Internal
);
todo_wine_if
(
codes
[
i
]
==
FIOASYNC
||
codes
[
i
]
==
0x667e
)
todo_wine_if
(
codes
[
i
]
==
FIOASYNC
)
ok
(
!
overlapped
.
InternalHigh
,
"got size %Iu
\n
"
,
overlapped
.
InternalHigh
);
CloseHandle
(
port
);
...
...
@@ -4183,12 +4184,14 @@ static void test_unsupported_ioctls(void)
ret
=
WSAIoctl
(
s
,
codes
[
i
],
NULL
,
0
,
NULL
,
0
,
&
size
,
&
overlapped
,
socket_apc
);
todo_wine_if
(
codes
[
i
]
==
SIO_FLUSH
)
ok
(
ret
==
-
1
,
"expected failure
\n
"
);
todo_wine
ok
(
WSAGetLastError
()
==
ERROR_IO_PENDING
,
"got error %u
\n
"
,
WSAGetLastError
());
todo_wine_if
(
codes
[
i
]
==
FIOASYNC
||
codes
[
i
]
==
SIO_FLUSH
)
ok
(
WSAGetLastError
()
==
ERROR_IO_PENDING
,
"got error %u
\n
"
,
WSAGetLastError
());
todo_wine_if
(
codes
[
i
]
==
SIO_FLUSH
)
ok
(
size
==
0xdeadbeef
,
"got size %u
\n
"
,
size
);
ret
=
SleepEx
(
0
,
TRUE
);
todo_wine
ok
(
ret
==
WAIT_IO_COMPLETION
,
"got %d
\n
"
,
ret
);
todo_wine_if
(
codes
[
i
]
==
FIOASYNC
||
codes
[
i
]
==
SIO_FLUSH
)
ok
(
ret
==
WAIT_IO_COMPLETION
,
"got %d
\n
"
,
ret
);
if
(
ret
==
WAIT_IO_COMPLETION
)
{
ok
(
apc_count
==
1
,
"APC was called %u times
\n
"
,
apc_count
);
...
...
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