First graphical accounting of IPv6.
[darkstat] / http.c
diff --git a/http.c b/http.c
index b9d8c58..b232705 100644 (file)
--- a/http.c
+++ b/http.c
@@ -324,10 +324,10 @@ static void accept_connection(void)
     memcpy(&conn->client, &addrin, sizeof(conn->client));
     LIST_INSERT_HEAD(&connlist, conn, entries);
 
-    getnameinfo((struct sockaddr *) &addrin, sizeof(addrin),
+    getnameinfo((struct sockaddr *) &addrin, sin_size,
             ipaddr, sizeof(ipaddr), portstr, sizeof(portstr),
             NI_NUMERICHOST | NI_NUMERICSERV);
-    verbosef("accepted connection from %s:%u", ipaddr, portstr);
+    verbosef("accepted connection from %s:%s", ipaddr, portstr);
 }