[
https://issues.apache.org/jira/browse/ZOOKEEPER-1451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13261428#comment-13261428
]
Hudson commented on ZOOKEEPER-1451:
-----------------------------------
Integrated in ZooKeeper-trunk #1537 (See
[https://builds.apache.org/job/ZooKeeper-trunk/1537/])
ZOOKEEPER-1451. C API improperly logs getaddrinfo failures on Linux when
using glibc (Stephen Tyree via michim) (Revision 1330043)
Result = SUCCESS
michim : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1330043
Files :
* /zookeeper/trunk/CHANGES.txt
* /zookeeper/trunk/src/c/src/zookeeper.c
> 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