0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

Better getAddr for unix sockets

This commit is contained in:
Mathias Stearn 2010-04-05 21:18:45 -04:00
parent d02c18cde4
commit afafbfa5a7

View File

@ -167,7 +167,7 @@ namespace mongo {
case AF_INET: return inet_ntop(getType(), &as<sockaddr_in>().sin_addr, buffer, addressSize);
case AF_INET6: return inet_ntop(getType(), &as<sockaddr_in6>().sin6_addr, buffer, addressSize);
#endif
case AF_UNIX: return as<sockaddr_un>().sun_path;
case AF_UNIX: return (addressSize > 2 ?as<sockaddr_un>().sun_path : "anonymous unix socket");
case AF_UNSPEC: return "(NONE)";
default: massert(SOCK_FAMILY_UNKNOWN_ERROR, "unsupported address family", false); return "";
}