X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet.c;h=9ec15fe17f1767d823dee1a8f758716d96b304bd;hp=30c73d90a647e5df15f589b3304a441391768aa9;hb=78e88521845ae3bdd963ae5a414cb9c251963fa2;hpb=97d492d9e23f43fe4c8a5ca8c95747088cf32f98 diff --git a/src/net.c b/src/net.c index 30c73d90..9ec15fe1 100644 --- a/src/net.c +++ b/src/net.c @@ -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.c,v 1.35.4.170 2002/04/18 20:09:05 zarq Exp $ + $Id: net.c,v 1.35.4.173 2002/06/08 14:08:57 guus Exp $ */ #include "config.h" @@ -26,8 +26,13 @@ #include #include #include -#ifdef HAVE_LINUX +#ifdef HAVE_NETINET_IN_SYSTM_H + #include +#endif +#ifdef HAVE_NETINET_IP_H #include +#endif +#ifdef HAVE_NETINET_TCP_H #include #endif #include @@ -155,14 +160,15 @@ cp c = (connection_t *)node->data; if(c->status.remove) - connection_del(c); + { + connection_del(c); + if(!connection_tree->head) + purge(); + } else FD_SET(c->socket, fs); } - if(!connection_tree->head) - purge(); - for(i = 0; i < listen_sockets; i++) { FD_SET(listen_socket[i].tcp, fs);