From: Florian Westphal Date: Thu, 28 Jun 2007 15:13:38 +0000 (+0000) Subject: Don't connect to a server if a connection to another server within the same group X-Git-Tag: rel-0-11-0-pre2~43 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git;a=commitdiff_plain;h=cd65e0a56ed2af507d76c582b54254c7e4b72970 Don't connect to a server if a connection to another server within the same group is in progress. --- diff --git a/ChangeLog b/ChangeLog index 87ecebd4..b1149cea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,8 @@ ngIRCd HEAD - Adjust path names in manual pages according to "./configure" settings. - Add new server config option to disable automatic connect. (Similar to -p option to ngircd, but only for the specified server) (Tassilo Schweyer) + - Don't connect to a server if a connection to another server within the same group + is in progress. ngIRCd 0.10.2 (2007-06-08) @@ -696,4 +698,4 @@ ngIRCd 0.0.1, 31.12.2001 -- -$Id: ChangeLog,v 1.318 2007/06/28 05:15:12 fw Exp $ +$Id: ChangeLog,v 1.319 2007/06/28 15:13:38 fw Exp $ diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c index b904e2e4..2cbb806c 100644 --- a/src/ngircd/conn.c +++ b/src/ngircd/conn.c @@ -17,7 +17,7 @@ #include "portab.h" #include "io.h" -static char UNUSED id[] = "$Id: conn.c,v 1.209 2007/05/17 23:34:24 alex Exp $"; +static char UNUSED id[] = "$Id: conn.c,v 1.210 2007/06/28 15:13:39 fw Exp $"; #include "imp.h" #include @@ -1333,7 +1333,7 @@ Check_Servers( void ) if( Conf_Server[i].group > NONE ) { for (n = 0; n < MAX_SERVERS; n++) { if (n == i) continue; - if ((Conf_Server[n].conn_id > NONE) && + if ((Conf_Server[n].conn_id != NONE) && (Conf_Server[n].group == Conf_Server[i].group)) break; } @@ -1346,7 +1346,7 @@ Check_Servers( void ) continue; /* Okay, try to connect now */ - Conf_Server[i].lasttry = time_now; + Conf_Server[i].conn_id = SERVER_WAIT; assert(Resolve_Getfd(&Conf_Server[i].res_stat) < 0); Resolve_Name(&Conf_Server[i].res_stat, Conf_Server[i].host, cb_Connect_to_Server); }