]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix bug #1842 Incorrect port number reported
authorMartin Simmons <martin@lispworks.com>
Thu, 22 Mar 2012 16:20:49 +0000 (17:20 +0100)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:50:33 +0000 (14:50 +0200)
An incorrect port number reported when console fails to authenticate.

Signed-off-by: Marco van Wieringen <mvw@planets.elm.net>
bacula/src/lib/bnet_server.c

index 598d003741ffeb63fc7ddba007d8f5e852c28c45..093941728171e16bebf23bf77544b0a630f036ad 100644 (file)
@@ -207,7 +207,7 @@ bnet_thread_server(dlist *addrs, int max_clients, workq_t *client_wq,
             sockaddr_to_ascii(&cli_addr, buf, sizeof(buf));
             V(mutex);
             BSOCK *bs;
-            bs = init_bsock(NULL, newsockfd, "client", buf, fd_ptr->port, &cli_addr);
+            bs = init_bsock(NULL, newsockfd, "client", buf, ntohs(fd_ptr->port), &cli_addr);
             if (bs == NULL) {
                Jmsg0(NULL, M_ABORT, 0, _("Could not create client BSOCK.\n"));
             }