/*
Bacula® - The Network Backup Solution
- Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
+ Copyright (C) 2000-2011 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
* Originally written by Kern Sibbald for inclusion in apcupsd,
* but heavily modified for Bacula
*
- * Version $Id$
*/
#include "bacula.h"
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"));
}