Commit 47bc1712 authored by deuce's avatar deuce
Browse files

Add support for AF_UNIX sockets in inet_addrtop()

parent 5ecf99b4
......@@ -420,6 +420,10 @@ const char *inet_addrtop(union xp_sockaddr *addr, char *dest, size_t size)
return inet_ntop(addr->in.sin_family, &addr->in.sin_addr, dest, size);
case AF_INET6:
return inet_ntop(addr->in6.sin6_family, &addr->in6.sin6_addr, dest, size);
case AF_UNIX:
strncpy(dest, addr->un.sun_path, size);
return dest;
safe_snprintf(dest, size, "<unknown address>");
return NULL;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment