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
6697759b
Commit
6697759b
authored
Dec 10, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Dec 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Make the afd_recvmsg_params structure WoW64-compatible.
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
737f6952
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
15 deletions
+23
-15
socket.c
dlls/ntdll/unix/socket.c
+10
-5
socket.c
dlls/ws2_32/socket.c
+7
-5
afd.h
include/wine/afd.h
+6
-5
No files found.
dlls/ntdll/unix/socket.c
View file @
6697759b
...
...
@@ -91,6 +91,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
winsock
);
#define u64_to_user_ptr(u) ((void *)(uintptr_t)(u))
union
unix_sockaddr
{
struct
sockaddr
addr
;
...
...
@@ -1414,6 +1416,7 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc
case
IOCTL_AFD_WINE_RECVMSG
:
{
struct
afd_recvmsg_params
*
params
=
in_buffer
;
unsigned
int
*
ws_flags
=
u64_to_user_ptr
(
params
->
ws_flags_ptr
);
int
unix_flags
=
0
;
if
((
status
=
server_get_unix_fd
(
handle
,
0
,
&
fd
,
&
needs_close
,
NULL
,
NULL
)))
...
...
@@ -1425,15 +1428,17 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc
break
;
}
if
(
*
params
->
ws_flags
&
WS_MSG_OOB
)
if
(
*
ws_flags
&
WS_MSG_OOB
)
unix_flags
|=
MSG_OOB
;
if
(
*
params
->
ws_flags
&
WS_MSG_PEEK
)
if
(
*
ws_flags
&
WS_MSG_PEEK
)
unix_flags
|=
MSG_PEEK
;
if
(
*
params
->
ws_flags
&
WS_MSG_WAITALL
)
if
(
*
ws_flags
&
WS_MSG_WAITALL
)
FIXME
(
"MSG_WAITALL is not supported
\n
"
);
status
=
sock_recv
(
handle
,
event
,
apc
,
apc_user
,
io
,
fd
,
params
->
buffers
,
params
->
count
,
params
->
control
,
params
->
addr
,
params
->
addr_len
,
params
->
ws_flags
,
unix_flags
,
params
->
force_async
);
status
=
sock_recv
(
handle
,
event
,
apc
,
apc_user
,
io
,
fd
,
u64_to_user_ptr
(
params
->
buffers_ptr
),
params
->
count
,
u64_to_user_ptr
(
params
->
control_ptr
),
u64_to_user_ptr
(
params
->
addr_ptr
),
u64_to_user_ptr
(
params
->
addr_len_ptr
),
ws_flags
,
unix_flags
,
params
->
force_async
);
break
;
}
...
...
dlls/ws2_32/socket.c
View file @
6697759b
...
...
@@ -35,6 +35,8 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag);
#define TIMEOUT_INFINITE _I64_MAX
#define u64_from_user_ptr(ptr) ((ULONGLONG)(uintptr_t)(ptr))
static
const
WSAPROTOCOL_INFOW
supported_protocols
[]
=
{
{
...
...
@@ -923,13 +925,13 @@ static int WS2_recv_base( SOCKET s, WSABUF *buffers, DWORD buffer_count, DWORD *
apc
=
socket_apc
;
}
params
.
control
=
control
;
params
.
addr
=
addr
;
params
.
addr_len
=
addr_len
;
params
.
ws_flags
=
flags
;
params
.
control
_ptr
=
u64_from_user_ptr
(
control
)
;
params
.
addr
_ptr
=
u64_from_user_ptr
(
addr
)
;
params
.
addr_len
_ptr
=
u64_from_user_ptr
(
addr_len
)
;
params
.
ws_flags
_ptr
=
u64_from_user_ptr
(
flags
)
;
params
.
force_async
=
!!
overlapped
;
params
.
count
=
buffer_count
;
params
.
buffers
=
buffers
;
params
.
buffers
_ptr
=
u64_from_user_ptr
(
buffers
)
;
status
=
NtDeviceIoControlFile
(
(
HANDLE
)
s
,
event
,
apc
,
cvalue
,
piosb
,
IOCTL_AFD_WINE_RECVMSG
,
&
params
,
sizeof
(
params
),
NULL
,
0
);
...
...
include/wine/afd.h
View file @
6697759b
...
...
@@ -281,14 +281,15 @@ C_ASSERT( sizeof(struct afd_connect_params) == 8 );
struct
afd_recvmsg_params
{
WSABUF
*
control
;
struct
WS
(
sockaddr
)
*
addr
;
int
*
addr_len
;
unsigned
int
*
ws_flags
;
ULONGLONG
control_ptr
;
/* WSABUF */
ULONGLONG
addr_ptr
;
/* WS(sockaddr) */
ULONGLONG
addr_len_ptr
;
/* int */
ULONGLONG
ws_flags_ptr
;
/* unsigned int */
int
force_async
;
unsigned
int
count
;
WSABUF
*
buffers
;
ULONGLONG
buffers_ptr
;
/* WSABUF[] */
};
C_ASSERT
(
sizeof
(
struct
afd_recvmsg_params
)
==
48
);
struct
afd_sendmsg_params
{
...
...
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