Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e20b1431
Commit
e20b1431
authored
Jul 05, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Use nameless union/structs.
parent
d8e35c51
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
19 deletions
+17
-19
protocol.c
dlls/ws2_32/protocol.c
+2
-2
socket.c
dlls/ws2_32/socket.c
+15
-15
ws2_32_private.h
dlls/ws2_32/ws2_32_private.h
+0
-2
No files found.
dlls/ws2_32/protocol.c
View file @
e20b1431
...
...
@@ -356,7 +356,7 @@ static void WINAPI getaddrinfo_callback(TP_CALLBACK_INSTANCE *instance, void *co
if
(
res
)
{
*
args
->
result
=
addrinfo_list_AtoW
(
res
);
overlapped
->
u
.
Pointer
=
args
->
result
;
overlapped
->
Pointer
=
args
->
result
;
freeaddrinfo
(
res
);
}
...
...
@@ -836,7 +836,7 @@ static struct hostent *get_local_ips( char *hostname )
/* Check if this is a default route (there may be more than one) */
if
(
!
routes
->
table
[
n
].
dwForwardDest
)
ifdefault
=
++
default_routes
;
else
if
(
routes
->
table
[
n
].
u1
.
ForwardType
!=
MIB_IPROUTE_TYPE_DIRECT
)
else
if
(
routes
->
table
[
n
].
ForwardType
!=
MIB_IPROUTE_TYPE_DIRECT
)
continue
;
ifindex
=
routes
->
table
[
n
].
dwForwardIfIndex
;
ifmetric
=
routes
->
table
[
n
].
dwForwardMetric1
;
...
...
dlls/ws2_32/socket.c
View file @
e20b1431
...
...
@@ -767,7 +767,7 @@ SOCKET WINAPI accept( SOCKET s, struct sockaddr *addr, int *len )
{
if
(
wait_event_alertable
(
sync_event
)
==
WAIT_FAILED
)
return
SOCKET_ERROR
;
status
=
io
.
u
.
Status
;
status
=
io
.
Status
;
}
if
(
status
)
{
...
...
@@ -862,8 +862,8 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE file, DWORD file_len, DWOR
event
=
overlapped
->
hEvent
;
overlapped
->
Internal
=
STATUS_PENDING
;
overlapped
->
InternalHigh
=
0
;
params
.
offset
.
u
.
LowPart
=
overlapped
->
u
.
s
.
Offset
;
params
.
offset
.
u
.
HighPart
=
overlapped
->
u
.
s
.
OffsetHigh
;
params
.
offset
.
LowPart
=
overlapped
->
Offset
;
params
.
offset
.
HighPart
=
overlapped
->
OffsetHigh
;
}
else
{
...
...
@@ -889,7 +889,7 @@ static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE file, DWORD file_len, DWOR
{
if
(
WaitForSingleObject
(
event
,
INFINITE
)
==
WAIT_FAILED
)
return
FALSE
;
status
=
piosb
->
u
.
Status
;
status
=
piosb
->
Status
;
}
SetLastError
(
NtStatusToWSAError
(
status
)
);
TRACE
(
"status %#lx.
\n
"
,
status
);
...
...
@@ -926,7 +926,7 @@ static void WINAPI WS2_GetAcceptExSockaddrs( void *buffer, DWORD data_size, DWOR
static
void
WINAPI
socket_apc
(
void
*
apc_user
,
IO_STATUS_BLOCK
*
io
,
ULONG
reserved
)
{
LPWSAOVERLAPPED_COMPLETION_ROUTINE
func
=
apc_user
;
func
(
NtStatusToWSAError
(
io
->
u
.
Status
),
io
->
Information
,
(
OVERLAPPED
*
)
io
,
0
);
func
(
NtStatusToWSAError
(
io
->
Status
),
io
->
Information
,
(
OVERLAPPED
*
)
io
,
0
);
}
static
int
WS2_recv_base
(
SOCKET
s
,
WSABUF
*
buffers
,
DWORD
buffer_count
,
DWORD
*
ret_size
,
DWORD
*
flags
,
...
...
@@ -954,7 +954,7 @@ static int WS2_recv_base( SOCKET s, WSABUF *buffers, DWORD buffer_count, DWORD *
{
if
(
!
(
event
=
get_sync_event
()))
return
-
1
;
}
piosb
->
u
.
Status
=
STATUS_PENDING
;
piosb
->
Status
=
STATUS_PENDING
;
if
(
completion
)
{
...
...
@@ -977,7 +977,7 @@ static int WS2_recv_base( SOCKET s, WSABUF *buffers, DWORD buffer_count, DWORD *
{
if
(
wait_event_alertable
(
event
)
==
WAIT_FAILED
)
return
-
1
;
status
=
piosb
->
u
.
Status
;
status
=
piosb
->
Status
;
}
if
(
!
status
&&
ret_size
)
*
ret_size
=
piosb
->
Information
;
SetLastError
(
NtStatusToWSAError
(
status
)
);
...
...
@@ -1022,7 +1022,7 @@ static int WS2_sendto( SOCKET s, WSABUF *buffers, DWORD buffer_count, DWORD *ret
{
if
(
!
(
event
=
get_sync_event
()))
return
-
1
;
}
piosb
->
u
.
Status
=
STATUS_PENDING
;
piosb
->
Status
=
STATUS_PENDING
;
if
(
completion
)
{
...
...
@@ -1044,7 +1044,7 @@ static int WS2_sendto( SOCKET s, WSABUF *buffers, DWORD buffer_count, DWORD *ret
{
if
(
WaitForSingleObject
(
event
,
INFINITE
)
==
WAIT_FAILED
)
return
-
1
;
status
=
piosb
->
u
.
Status
;
status
=
piosb
->
Status
;
}
if
(
!
status
&&
ret_size
)
*
ret_size
=
piosb
->
Information
;
SetLastError
(
NtStatusToWSAError
(
status
)
);
...
...
@@ -1174,7 +1174,7 @@ int WINAPI bind( SOCKET s, const struct sockaddr *addr, int len )
{
if
(
WaitForSingleObject
(
sync_event
,
INFINITE
)
==
WAIT_FAILED
)
return
-
1
;
status
=
io
.
u
.
Status
;
status
=
io
.
Status
;
}
if
(
status
)
TRACE
(
"failed, status %#lx.
\n
"
,
status
);
...
...
@@ -1241,7 +1241,7 @@ int WINAPI connect( SOCKET s, const struct sockaddr *addr, int len )
if
(
status
==
STATUS_PENDING
)
{
if
(
wait_event_alertable
(
sync_event
)
==
WAIT_FAILED
)
return
-
1
;
status
=
io
.
u
.
Status
;
status
=
io
.
Status
;
}
if
(
status
)
{
...
...
@@ -2266,7 +2266,7 @@ static DWORD server_ioctl_sock( SOCKET s, DWORD code, LPVOID in_buff, DWORD in_s
{
if
(
WaitForSingleObject
(
event
,
INFINITE
)
==
WAIT_FAILED
)
return
-
1
;
status
=
piosb
->
u
.
Status
;
status
=
piosb
->
Status
;
}
if
(
status
==
STATUS_NOT_SUPPORTED
)
{
...
...
@@ -2847,7 +2847,7 @@ int WINAPI select( int count, fd_set *read_ptr, fd_set *write_ptr,
free
(
params
);
return
-
1
;
}
status
=
io
.
u
.
Status
;
status
=
io
.
Status
;
}
if
(
status
==
STATUS_TIMEOUT
)
status
=
STATUS_SUCCESS
;
if
(
!
status
)
...
...
@@ -2999,7 +2999,7 @@ int WINAPI WSAPoll( WSAPOLLFD *fds, ULONG count, int timeout )
free
(
params
);
return
-
1
;
}
status
=
io
.
u
.
Status
;
status
=
io
.
Status
;
}
if
(
!
status
)
{
...
...
@@ -3732,7 +3732,7 @@ BOOL WINAPI WSAGetOverlappedResult( SOCKET s, LPWSAOVERLAPPED lpOverlapped,
*
lpcbTransfer
=
lpOverlapped
->
InternalHigh
;
if
(
lpdwFlags
)
*
lpdwFlags
=
lpOverlapped
->
u
.
s
.
Offset
;
*
lpdwFlags
=
lpOverlapped
->
Offset
;
SetLastError
(
NtStatusToWSAError
(
status
)
);
TRACE
(
"status %#lx.
\n
"
,
status
);
...
...
dlls/ws2_32/ws2_32_private.h
View file @
e20b1431
...
...
@@ -26,8 +26,6 @@
#include <string.h>
#include <limits.h>
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
...
...
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