From: Martin Simmons Date: Thu, 22 Mar 2012 16:20:49 +0000 (+0100) Subject: Fix bug #1842 Incorrect port number reported X-Git-Tag: Release-7.0.0~271 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c72f724b5eaa7ce53695784366d5498a4e00c1b9;p=bacula%2Fbacula Fix bug #1842 Incorrect port number reported An incorrect port number reported when console fails to authenticate. Signed-off-by: Marco van Wieringen --- diff --git a/bacula/src/lib/bnet_server.c b/bacula/src/lib/bnet_server.c index 598d003741..0939417281 100644 --- a/bacula/src/lib/bnet_server.c +++ b/bacula/src/lib/bnet_server.c @@ -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")); }