From c72f724b5eaa7ce53695784366d5498a4e00c1b9 Mon Sep 17 00:00:00 2001 From: Martin Simmons Date: Thu, 22 Mar 2012 17:20:49 +0100 Subject: [PATCH] Fix bug #1842 Incorrect port number reported An incorrect port number reported when console fails to authenticate. Signed-off-by: Marco van Wieringen --- bacula/src/lib/bnet_server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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")); } -- 2.39.5