Revision: 14585
Author: adrian.chadd
Date: Sun Apr 11 04:08:58 2010
Log: Issue #94 - Remove the inet_ntop() reliance so portability to win32 is
easier.
http://code.google.com/p/lusca-cache/source/detail?r=14585
Modified:
/branches/LUSCA_HEAD/libcore/radix.c
=======================================
--- /branches/LUSCA_HEAD/libcore/radix.c Fri Mar 26 06:11:29 2010
+++ /branches/LUSCA_HEAD/libcore/radix.c Sun Apr 11 04:08:58 2010
@@ -693,7 +693,10 @@
const char *
prefix_addr_ntop(prefix_t *prefix, char *buf, size_t len)
{
- return (inet_ntop(prefix->family, &prefix->add, buf, len));
+ if (getnameinfo(&prefix->add, sizeof(prefix->add), NULL, 0, buf, len,
NI_NUMERICHOST) == 0)
+ return buf;
+
+ return NULL;
}
const char *
--
You received this message because you are subscribed to the Google Groups
"lusca-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/lusca-commit?hl=en.