]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/bnet_server.c
Fix get_basename() -- rewrite
[bacula/bacula] / bacula / src / lib / bnet_server.c
index 0602ebb5079536d789dce01d4e1fbb484132994e..093941728171e16bebf23bf77544b0a630f036ad 100644 (file)
@@ -1,12 +1,12 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2000-2007 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.
    This program is Free Software; you can redistribute it and/or
-   modify it under the terms of version two of the GNU General Public
+   modify it under the terms of version three of the GNU Affero General Public
    License as published by the Free Software Foundation and included
    in the file LICENSE.
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Affero General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   Bacula® is a registered trademark of John Walker.
+   Bacula® is a registered trademark of Kern Sibbald.
    The licensor of Bacula is the Free Software Foundation Europe
    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
    Switzerland, email:ftf@fsfeurope.org.
@@ -29,7 +29,6 @@
   * Originally written by Kern Sibbald for inclusion in apcupsd,
   *  but heavily modified for Bacula
   *
-  *   Version $Id$
   */
 
 #include "bacula.h"
@@ -42,7 +41,7 @@
 #include <arpa/nameser.h>
 #endif
 #ifdef HAVE_RESOLV_H
-#include <resolv.h>
+//#include <resolv.h>
 #endif
 
 
@@ -137,7 +136,7 @@ bnet_thread_server(dlist *addrs, int max_clients, workq_t *client_wq,
                   be.bstrerror());
          }
       }
-      listen(fd_ptr->fd, 5);       /* tell system we are ready */
+      listen(fd_ptr->fd, 50);      /* tell system we are ready */
       sockfds.append(fd_ptr);
    }
    /* Start work queue thread */
@@ -208,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"));
             }
@@ -238,5 +237,3 @@ bnet_thread_server(dlist *addrs, int max_clients, workq_t *client_wq,
             be.bstrerror());
    }
 }
-
-