X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet.c;h=6457d4c9c431478b8767c6aa459f3592a910a8c8;hp=31acd38900a0939d45e73e5f02326314b19f5407;hb=04cb206298df033d254ca007205d13f9a670c402;hpb=783c8298610d5670f6e118f49bd3d1fdfa61ae1d diff --git a/src/net.c b/src/net.c index 31acd389..6457d4c9 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.7 2000/06/26 19:39:34 guus Exp $ + $Id: net.c,v 1.35.4.8 2000/06/26 20:30:20 guus Exp $ */ #include "config.h" @@ -772,7 +772,8 @@ cp p->last_ping_time = time(NULL); p->want_ping = 0; - syslog(LOG_NOTICE, _("Connection from %s port %d"), + if(debug_lvl > 0) + syslog(LOG_NOTICE, _("Connection from %s port %d"), p->hostname, htons(ci.sin_port)); if(send_basic_info(p) < 0) @@ -902,9 +903,15 @@ cp syslog(LOG_NOTICE, _("Trying to re-establish outgoing connection in 5 seconds")); } - cl->status.active = 0; cl->status.remove = 1; + /* If this cl isn't active, don't send any DEL_HOSTs and don't bother + checking for other lost connections. */ + if(!cl->status.active) + return; + + cl->status.active = 0; + cp /* Find all connections that were lost because they were behind cl (the connection that was dropped). */