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
8fb897a5
Commit
8fb897a5
authored
Sep 24, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Sep 25, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Translate WSA_FLAG_OVERLAPPED to NT overlapped flags.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4c86e860
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
socket.c
dlls/ws2_32/socket.c
+3
-2
sock.c
server/sock.c
+8
-4
No files found.
dlls/ws2_32/socket.c
View file @
8fb897a5
...
...
@@ -7716,7 +7716,8 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol,
RtlInitUnicodeString
(
&
string
,
afdW
);
InitializeObjectAttributes
(
&
attr
,
&
string
,
(
flags
&
WSA_FLAG_NO_HANDLE_INHERIT
)
?
0
:
OBJ_INHERIT
,
NULL
,
NULL
);
if
((
status
=
NtOpenFile
(
&
handle
,
GENERIC_READ
|
GENERIC_WRITE
|
SYNCHRONIZE
,
&
attr
,
&
io
,
0
,
0
)))
if
((
status
=
NtOpenFile
(
&
handle
,
GENERIC_READ
|
GENERIC_WRITE
|
SYNCHRONIZE
,
&
attr
,
&
io
,
0
,
(
flags
&
WSA_FLAG_OVERLAPPED
)
?
0
:
FILE_SYNCHRONOUS_IO_NONALERT
)))
{
WARN
(
"Failed to create socket, status %#x.
\n
"
,
status
);
WSASetLastError
(
NtStatusToWSAError
(
status
));
...
...
@@ -7726,7 +7727,7 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol,
create_params
.
family
=
unixaf
;
create_params
.
type
=
unixtype
;
create_params
.
protocol
=
protocol
;
create_params
.
flags
=
flags
&
~
WSA_FLAG_NO_HANDLE_INHERIT
;
create_params
.
flags
=
flags
&
~
(
WSA_FLAG_NO_HANDLE_INHERIT
|
WSA_FLAG_OVERLAPPED
)
;
if
((
status
=
NtDeviceIoControlFile
(
handle
,
NULL
,
NULL
,
NULL
,
&
io
,
IOCTL_AFD_CREATE
,
&
create_params
,
sizeof
(
create_params
),
NULL
,
0
)))
{
...
...
server/sock.c
View file @
8fb897a5
...
...
@@ -315,7 +315,7 @@ static inline int sock_error( struct fd *fd )
static
int
sock_dispatch_asyncs
(
struct
sock
*
sock
,
int
event
,
int
error
)
{
if
(
sock
->
flags
&
WSA_FLAG_OVERLAPPED
)
if
(
is_fd_overlapped
(
sock
->
fd
)
)
{
if
(
event
&
(
POLLIN
|
POLLPRI
)
&&
async_waiting
(
&
sock
->
read_q
))
{
...
...
@@ -680,6 +680,7 @@ static struct sock *create_socket(void)
static
int
init_socket
(
struct
sock
*
sock
,
int
family
,
int
type
,
int
protocol
,
unsigned
int
flags
)
{
unsigned
int
options
=
0
;
int
sockfd
;
sockfd
=
socket
(
family
,
type
,
protocol
);
...
...
@@ -696,10 +697,13 @@ static int init_socket( struct sock *sock, int family, int type, int protocol, u
sock
->
type
=
type
;
sock
->
family
=
family
;
if
(
sock
->
fd
)
release_object
(
sock
->
fd
);
if
(
sock
->
fd
)
{
options
=
get_fd_options
(
sock
->
fd
);
release_object
(
sock
->
fd
);
}
if
(
!
(
sock
->
fd
=
create_anonymous_fd
(
&
sock_fd_ops
,
sockfd
,
&
sock
->
obj
,
(
flags
&
WSA_FLAG_OVERLAPPED
)
?
0
:
FILE_SYNCHRONOUS_IO_NONALERT
)))
if
(
!
(
sock
->
fd
=
create_anonymous_fd
(
&
sock_fd_ops
,
sockfd
,
&
sock
->
obj
,
options
)))
{
return
-
1
;
}
...
...
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