[
https://issues.apache.org/jira/browse/ZOOKEEPER-1451?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stephen Tyree updated ZOOKEEPER-1451:
-------------------------------------
Attachment: ZOOKEEPER-1451.patch
> C API improperly logs getaddrinfo failures on Linux when using glibc
> --------------------------------------------------------------------
>
> Key: ZOOKEEPER-1451
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1451
> Project: ZooKeeper
> Issue Type: Bug
> Components: c client
> Affects Versions: 3.4.3
> Environment: Linux when using glibc
> Reporter: Stephen Tyree
> Assignee: Stephen Tyree
> Priority: Trivial
> Attachments: ZOOKEEPER-1451.patch
>
>
> This is how the code currently logs getaddrinfo errors:
> {quote}
> errno = getaddrinfo_errno(rc);
> LOG_ERROR(("getaddrinfo: %s\n", strerror(errno)));
> {quote}
> On Linux, specifically when using glibc, there is a better function for
> logging getaddrinfo errors called gai_strerror. An example:
> {quote}
> LOG_ERROR(("getaddrinfo: %s\n", gai_strerror(rc)));
> {quote}
> It doesn't miss a lot of cases like the errno based version does.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira