From: Art Cancro Date: Tue, 24 Aug 2010 20:16:08 +0000 (+0000) Subject: * No need to load the service name in getnameinfo() - we were just throwing it away... X-Git-Tag: v8.01~857 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=c173a20c8a5ef916175b729dc2ff4f1c1c374c83;p=citadel.git * No need to load the service name in getnameinfo() - we were just throwing it away. Replace with NULL. --- diff --git a/webcit/locate_host.c b/webcit/locate_host.c index 488a472a9..c3ea81475 100644 --- a/webcit/locate_host.c +++ b/webcit/locate_host.c @@ -30,14 +30,8 @@ void locate_host(StrBuf *tbuf, int client_socket) struct sockaddr_in6 clientaddr; unsigned int addrlen = sizeof(clientaddr); char clienthost[NI_MAXHOST]; - char clientservice[NI_MAXSERV]; getpeername(client_socket, (struct sockaddr *)&clientaddr, &addrlen); - getnameinfo((struct sockaddr *)&clientaddr, addrlen, - clienthost, sizeof(clienthost), - clientservice, sizeof(clientservice), - 0 - ); - + getnameinfo((struct sockaddr *)&clientaddr, addrlen, clienthost, sizeof(clienthost), NULL, 0, 0); StrBufAppendBufPlain(tbuf, clienthost, -1, 0); }