From: Kern Sibbald Date: Tue, 14 Feb 2017 10:15:43 +0000 (+0100) Subject: Fix getnameinfo() for FreeBSD fixes bug #2083 X-Git-Tag: Release-7.4.6~9 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ad861558ae4fc1eaa7641337c9dc77429d7c0448;p=bacula%2Fbacula Fix getnameinfo() for FreeBSD fixes bug #2083 --- diff --git a/bacula/src/lib/address_conf.c b/bacula/src/lib/address_conf.c index 669f5ef792..52621103f7 100644 --- a/bacula/src/lib/address_conf.c +++ b/bacula/src/lib/address_conf.c @@ -614,7 +614,7 @@ char *sockaddr_to_ascii(const struct sockaddr *sa, int socklen, char *buf, int b char clientservice[NI_MAXSERV]; int status = 1; if (sa->sa_family == AF_INET) { - status = getnameinfo(sa, socklen, clienthost, sizeof(clienthost), + status = getnameinfo(sa, sizeof(sockaddr_in), clienthost, sizeof(clienthost), clientservice, sizeof(clientservice), NI_NUMERICHOST | NI_NUMERICSERV); }