Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
fb963625
Commit
fb963625
authored
Sep 15, 2020
by
Alistair Leslie-Hughes
Committed by
Vitaly Lipatov
Jul 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Return a valid value for WSAIoctl SIO_IDEAL_SEND_BACKLOG_QUERY.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
parent
758e7cad
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
1 deletion
+49
-1
socket.c
dlls/ntdll/unix/socket.c
+19
-0
socket.c
dlls/ws2_32/socket.c
+17
-0
sock.c
dlls/ws2_32/tests/sock.c
+12
-1
afd.h
include/wine/afd.h
+1
-0
No files found.
dlls/ntdll/unix/socket.c
View file @
fb963625
...
...
@@ -1726,6 +1726,25 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc
return
STATUS_SUCCESS
;
}
case
IOCTL_AFD_WINE_SEND_BACKLOG_QUERY
:
{
if
(
out_size
<
sizeof
(
DWORD
))
{
status
=
STATUS_BUFFER_TOO_SMALL
;
break
;
}
if
(
get_sock_type
(
handle
)
!=
SOCK_STREAM
)
{
status
=
STATUS_NOT_SUPPORTED
;
break
;
}
*
(
DWORD
*
)
out_buffer
=
0x10000
;
/* 64k */
break
;
}
case
IOCTL_AFD_WINE_SIOCATMARK
:
{
int
value
,
ret
;
...
...
dlls/ws2_32/socket.c
View file @
fb963625
...
...
@@ -2327,6 +2327,23 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
return
ret
?
-
1
:
0
;
}
case
SIO_IDEAL_SEND_BACKLOG_QUERY
:
{
DWORD
ret
;
if
(
!
out_buff
)
{
SetLastError
(
WSAEFAULT
);
return
SOCKET_ERROR
;
}
ret
=
server_ioctl_sock
(
s
,
IOCTL_AFD_WINE_SEND_BACKLOG_QUERY
,
in_buff
,
in_size
,
out_buff
,
out_size
,
ret_size
,
overlapped
,
completion
);
SetLastError
(
ret
);
if
(
!
ret
)
*
ret_size
=
sizeof
(
u_long
);
return
ret
?
-
1
:
0
;
}
case
SIOCATMARK
:
{
DWORD
ret
;
...
...
dlls/ws2_32/tests/sock.c
View file @
fb963625
...
...
@@ -6820,8 +6820,9 @@ static void test_WSASendTo(void)
struct
sockaddr_in
addr
,
ret_addr
;
char
buf
[
12
]
=
"hello world"
;
WSABUF
data_buf
;
DWORD
bytesSent
;
DWORD
bytesSent
,
size
;
int
ret
,
len
;
ULONG
backlog
=
0
;
addr
.
sin_family
=
AF_INET
;
addr
.
sin_port
=
htons
(
139
);
...
...
@@ -6857,6 +6858,11 @@ static void test_WSASendTo(void)
ok
(
!
ret
,
"got error %u
\n
"
,
WSAGetLastError
());
ok
(
ret_addr
.
sin_family
==
AF_INET
,
"got family %u
\n
"
,
ret_addr
.
sin_family
);
ok
(
ret_addr
.
sin_port
,
"expected nonzero port
\n
"
);
ret
=
WSAIoctl
(
s
,
SIO_IDEAL_SEND_BACKLOG_QUERY
,
NULL
,
0
,
&
backlog
,
sizeof
(
backlog
),
&
size
,
NULL
,
NULL
);
ok
(
ret
==
SOCKET_ERROR
&&
WSAGetLastError
()
==
WSAEOPNOTSUPP
,
"WSAIoctl() failed: %d/%d
\n
"
,
ret
,
WSAGetLastError
());
closesocket
(
s
);
}
struct
recv_thread_apc_param
...
...
@@ -6936,6 +6942,7 @@ static void test_WSARecv(void)
DWORD
dwret
;
BOOL
bret
;
HANDLE
thread
,
event
=
NULL
,
io_port
;
ULONG
backlog
=
0
,
size
;
tcp_socketpair
(
&
src
,
&
dest
);
...
...
@@ -7101,6 +7108,10 @@ static void test_WSARecv(void)
CloseHandle
(
io_port
);
iret
=
WSAIoctl
(
src
,
SIO_IDEAL_SEND_BACKLOG_QUERY
,
NULL
,
0
,
&
backlog
,
sizeof
(
backlog
),
&
size
,
NULL
,
NULL
);
ok
(
!
iret
,
"WSAIoctl() failed: %d/%d
\n
"
,
iret
,
WSAGetLastError
());
ok
(
backlog
==
0x10000
,
"got %08lx
\n
"
,
backlog
);
end:
if
(
server
!=
INVALID_SOCKET
)
closesocket
(
server
);
...
...
include/wine/afd.h
View file @
fb963625
...
...
@@ -283,6 +283,7 @@ C_ASSERT( sizeof(struct afd_get_events_params) == 56 );
#define IOCTL_AFD_WINE_SET_IP_RECVTTL WINE_AFD_IOC(294)
#define IOCTL_AFD_WINE_GET_IP_RECVTOS WINE_AFD_IOC(295)
#define IOCTL_AFD_WINE_SET_IP_RECVTOS WINE_AFD_IOC(296)
#define IOCTL_AFD_WINE_SEND_BACKLOG_QUERY WINE_AFD_IOC(297)
struct
afd_iovec
{
...
...
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