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
c33e7308
Commit
c33e7308
authored
Apr 15, 2014
by
Bruno Jesus
Committed by
Alexandre Julliard
Apr 15, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Use the correct address family in gethostbyaddr.
parent
2451d263
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
socket.c
dlls/ws2_32/socket.c
+4
-3
No files found.
dlls/ws2_32/socket.c
View file @
c33e7308
...
...
@@ -5084,6 +5084,7 @@ struct WS_hostent* WINAPI WS_gethostbyaddr(const char *addr, int len, int type)
{
struct
WS_hostent
*
retval
=
NULL
;
struct
hostent
*
host
;
int
unixtype
=
convert_af_w2u
(
type
);
#ifdef HAVE_LINUX_GETHOSTBYNAME_R_6
char
*
extrabuf
;
...
...
@@ -5093,7 +5094,7 @@ struct WS_hostent* WINAPI WS_gethostbyaddr(const char *addr, int len, int type)
host
=
NULL
;
extrabuf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
ebufsize
)
;
while
(
extrabuf
)
{
int
res
=
gethostbyaddr_r
(
addr
,
len
,
type
,
int
res
=
gethostbyaddr_r
(
addr
,
len
,
unix
type
,
&
hostentry
,
extrabuf
,
ebufsize
,
&
host
,
&
locerr
);
if
(
res
!=
ERANGE
)
break
;
ebufsize
*=
2
;
...
...
@@ -5102,7 +5103,7 @@ struct WS_hostent* WINAPI WS_gethostbyaddr(const char *addr, int len, int type)
if
(
!
host
)
SetLastError
((
locerr
<
0
)
?
wsaErrno
()
:
wsaHerrno
(
locerr
));
#else
EnterCriticalSection
(
&
csWSgetXXXbyYYY
);
host
=
gethostbyaddr
(
addr
,
len
,
type
);
host
=
gethostbyaddr
(
addr
,
len
,
unix
type
);
if
(
!
host
)
SetLastError
((
h_errno
<
0
)
?
wsaErrno
()
:
wsaHerrno
(
h_errno
));
#endif
if
(
host
!=
NULL
)
retval
=
WS_dup_he
(
host
);
...
...
@@ -6408,7 +6409,7 @@ static struct WS_hostent *WS_dup_he(const struct hostent* p_he)
p_to
=
WS_create_he
(
p_he
->
h_name
,
i
+
1
,
alias_size
,
addresses
+
1
,
p_he
->
h_length
);
if
(
!
p_to
)
return
NULL
;
p_to
->
h_addrtype
=
p_he
->
h_addrtype
;
p_to
->
h_addrtype
=
convert_af_u2w
(
p_he
->
h_addrtype
)
;
p_to
->
h_length
=
p_he
->
h_length
;
for
(
i
=
0
,
p
=
p_to
->
h_addr_list
[
0
];
p_he
->
h_addr_list
[
i
];
i
++
,
p
+=
p_to
->
h_length
)
...
...
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