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
8549821b
Commit
8549821b
authored
Jan 10, 2002
by
Francois Gouget
Committed by
Alexandre Julliard
Jan 10, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix previous patch: the ws_sockaddr_u2ws return value was wrong.
Make ws_sockaddr_{ws2u,u2ws} static.
parent
13b0c091
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
socket.c
dlls/winsock/socket.c
+9
-4
No files found.
dlls/winsock/socket.c
View file @
8549821b
...
...
@@ -797,7 +797,7 @@ static void ws2_async_accept(SOCKET s, SOCKET as)
* start with. Note that the returned pointer may be the original pointer
* if no conversion is necessary.
*/
const
struct
sockaddr
*
ws_sockaddr_ws2u
(
const
struct
WS_sockaddr
*
wsaddr
,
int
wsaddrlen
,
int
*
uaddrlen
)
static
const
struct
sockaddr
*
ws_sockaddr_ws2u
(
const
struct
WS_sockaddr
*
wsaddr
,
int
wsaddrlen
,
int
*
uaddrlen
)
{
switch
(
wsaddr
->
sa_family
)
{
...
...
@@ -849,7 +849,7 @@ inline struct sockaddr* ws_sockaddr_alloc(const struct WS_sockaddr* wsaddr, int*
}
/* Returns 0 if successful, -1 if the buffer is too small */
int
ws_sockaddr_u2ws
(
const
struct
sockaddr
*
uaddr
,
int
uaddrlen
,
struct
WS_sockaddr
*
wsaddr
,
int
*
wsaddrlen
)
static
int
ws_sockaddr_u2ws
(
const
struct
sockaddr
*
uaddr
,
int
uaddrlen
,
struct
WS_sockaddr
*
wsaddr
,
int
*
wsaddrlen
)
{
int
res
;
...
...
@@ -866,6 +866,7 @@ int ws_sockaddr_u2ws(const struct sockaddr* uaddr, int uaddrlen, struct WS_socka
{
default:
res
=
0
;
/* enough */
*
wsaddrlen
=
uaddrlen
;
wsipx
->
sa_socket
=
uipx
->
sipx_port
;
/* fall through */
case
13
:
...
...
@@ -896,9 +897,13 @@ int ws_sockaddr_u2ws(const struct sockaddr* uaddr, int uaddrlen, struct WS_socka
default:
/* No conversion needed */
*
wsaddrlen
=
min
(
*
wsaddrlen
,
uaddrlen
);
memcpy
(
wsaddr
,
uaddr
,
*
wsaddrlen
);
res
=
(
*
wsaddrlen
<
uaddrlen
?-
1
:
0
);
if
(
*
wsaddrlen
<
uaddrlen
)
{
res
=-
1
;
}
else
{
*
wsaddrlen
=
uaddrlen
;
res
=
0
;
}
}
return
res
;
}
...
...
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