Fix hostname and port length

This commit is contained in:
Michael Theall 2016-01-23 03:38:03 -06:00
parent 6188d8b4f0
commit 717e4cfdc0

View File

@ -902,7 +902,7 @@ ftp_session_new(int listen_fd)
/* reverse dns lookup */ /* reverse dns lookup */
rc = getnameinfo((struct sockaddr*)&addr, addrlen, rc = getnameinfo((struct sockaddr*)&addr, addrlen,
host, 15, serv, 2, 0); host, sizeof(host), serv, sizeof(serv), 0);
if(rc != 0) if(rc != 0)
console_print(CYAN "accepted connection from %s:%u\n" RESET, console_print(CYAN "accepted connection from %s:%u\n" RESET,
inet_ntoa(addr.sin_addr), ntohs(addr.sin_port)); inet_ntoa(addr.sin_addr), ntohs(addr.sin_port));