]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix getnameinfo() for FreeBSD fixes bug #2083
authorKern Sibbald <kern@sibbald.com>
Tue, 14 Feb 2017 10:15:43 +0000 (11:15 +0100)
committerKern Sibbald <kern@sibbald.com>
Tue, 14 Feb 2017 10:15:43 +0000 (11:15 +0100)
bacula/src/lib/address_conf.c

index 669f5ef792b3b7cb2130bd722db95aaeaddda8f7..52621103f77ad88558e24e2aed1b544756f2bdc7 100644 (file)
@@ -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);
   }