X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet_socket.c;h=e0cec2c8a1ee31e65aca9d9348011bd7fb447ea9;hp=74841875d5a827112b1f2150f5dc04e6301e015e;hb=d134c4542d4e890e1c1007f32b866742319853c5;hpb=116ba3b3da73fb857cf75b5c92c6aacd70d94dd9 diff --git a/src/net_socket.c b/src/net_socket.c index 74841875..e0cec2c8 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -1,7 +1,7 @@ /* net_socket.c -- Handle various kinds of sockets. - Copyright (C) 1998-2002 Ivo Timmermans , - 2000-2002 Guus Sliepen + Copyright (C) 1998-2002 Ivo Timmermans , + 2000-2002 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: net_socket.c,v 1.1.2.13 2002/06/08 12:57:10 guus Exp $ + $Id: net_socket.c,v 1.1.2.17 2002/09/03 20:43:25 guus Exp $ */ #include "config.h" @@ -26,6 +26,9 @@ #include #include #include +#ifdef HAVE_NETINET_IN_SYSTM_H + #include +#endif #ifdef HAVE_NETINET_IP_H #include #endif @@ -60,7 +63,6 @@ #include "process.h" #include "protocol.h" #include "subnet.h" -#include "graph.h" #include "process.h" #include "route.h" #include "device.h" @@ -77,7 +79,7 @@ int maxtimeout = 900; int seconds_till_retry = 5; listen_socket_t listen_socket[MAXSOCKETS]; -int listen_sockets = 0; +int listen_sockets; /* Setup sockets */ @@ -144,7 +146,7 @@ cp return -1; } - if(listen(nfd, 3)) + if(listen(nfd, 0)) { close(nfd); syslog(LOG_ERR, _("System call `%s' failed: %s"), "listen", strerror(errno));