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
be101103
Commit
be101103
authored
Apr 27, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Apr 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Avoid gai_strerror().
It's not thread-safe. Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
468ec36c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
rpc_transport.c
dlls/rpcrt4/rpc_transport.c
+5
-6
No files found.
dlls/rpcrt4/rpc_transport.c
View file @
be101103
...
...
@@ -941,7 +941,7 @@ static size_t rpcrt4_ip_tcp_get_top_of_tower(unsigned char *tower_data,
ret
=
getaddrinfo
(
"0.0.0.0"
,
endpoint
,
&
hints
,
&
ai
);
if
(
ret
)
{
ERR
(
"getaddrinfo failed
: %s
\n
"
,
gai_strerror
(
ret
));
ERR
(
"getaddrinfo failed
, error %u
\n
"
,
WSAGetLastError
(
));
return
0
;
}
}
...
...
@@ -1147,8 +1147,8 @@ static RPC_STATUS rpcrt4_ncacn_ip_tcp_open(RpcConnection* Connection)
ret
=
getaddrinfo
(
Connection
->
NetworkAddr
,
Connection
->
Endpoint
,
&
hints
,
&
ai
);
if
(
ret
)
{
ERR
(
"getaddrinfo for %s:%s failed
: %s
\n
"
,
Connection
->
NetworkAddr
,
Connection
->
Endpoint
,
gai_strerror
(
ret
));
ERR
(
"getaddrinfo for %s:%s failed
, error %u
\n
"
,
Connection
->
NetworkAddr
,
Connection
->
Endpoint
,
WSAGetLastError
(
));
return
RPC_S_SERVER_UNAVAILABLE
;
}
...
...
@@ -1228,8 +1228,7 @@ static RPC_STATUS rpcrt4_protseq_ncacn_ip_tcp_open_endpoint(RpcServerProtseq *pr
ret
=
getaddrinfo
(
NULL
,
endpoint
?
endpoint
:
"0"
,
&
hints
,
&
ai
);
if
(
ret
)
{
ERR
(
"getaddrinfo for port %s failed: %s
\n
"
,
endpoint
,
gai_strerror
(
ret
));
ERR
(
"getaddrinfo for port %s failed, error %u
\n
"
,
endpoint
,
WSAGetLastError
());
if
((
ret
==
EAI_SERVICE
)
||
(
ret
==
EAI_NONAME
))
return
RPC_S_INVALID_ENDPOINT_FORMAT
;
return
RPC_S_CANT_CREATE_ENDPOINT
;
...
...
@@ -1293,7 +1292,7 @@ static RPC_STATUS rpcrt4_protseq_ncacn_ip_tcp_open_endpoint(RpcServerProtseq *pr
NI_NUMERICSERV
);
if
(
ret
)
{
WARN
(
"getnameinfo failed
: %s
\n
"
,
gai_strerror
(
ret
));
WARN
(
"getnameinfo failed
, error %u
\n
"
,
WSAGetLastError
(
));
closesocket
(
sock
);
status
=
RPC_S_CANT_CREATE_ENDPOINT
;
continue
;
...
...
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