- Config->ConfValue("bind", "port", count, configToken, MAXBUF);
- Config->ConfValue("bind", "address", count, Addr, MAXBUF);
- Config->ConfValue("bind", "type", count, Type, MAXBUF);
- Config->ConfValue("bind", "ssl", count, Desc, MAXBUF);
-
- if (strncmp(Addr, "::ffff:", 7) == 0)
- this->Logs->Log("SOCKET",DEFAULT, "Using 4in6 (::ffff:) isn't recommended. You should bind IPv4 addresses directly instead.");
+ if (!inet_ntop(AF_INET, &in4.sin_addr, addrv, sizeof(addrv)))
+ return "";
+ return addrv;
+ }
+ else if (sa.sa_family == AF_INET6)
+ {
+ if (!inet_ntop(AF_INET6, &in6.sin6_addr, addrv, sizeof(addrv)))
+ return "";
+ return addrv;
+ }
+ return "";
+}