X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet.c;h=4a5c4b9f72a6631b987ea185140d00be69d58508;hp=30c73d90a647e5df15f589b3304a441391768aa9;hb=82ebfc923ddb050c88bdf5d65ac943a15ca8748a;hpb=97d492d9e23f43fe4c8a5ca8c95747088cf32f98 diff --git a/src/net.c b/src/net.c index 30c73d90..4a5c4b9f 100644 --- a/src/net.c +++ b/src/net.c @@ -1,7 +1,7 @@ /* net.c -- most of the network code - 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.c,v 1.35.4.170 2002/04/18 20:09:05 zarq Exp $ + $Id: net.c,v 1.35.4.176 2002/09/04 13:48:51 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);