repo: ngircd
action: commit
revision: 
path_from: 
revision_from: cd65e0a56ed2af507d76c582b54254c7e4b72970:
path_to: 
revision_to: 
git.thebackupbox.net
ngircd
git clone git://git.thebackupbox.net/ngircd
commit cd65e0a56ed2af507d76c582b54254c7e4b72970
Author: Florian Westphal 
Date:   Thu Jun 28 15:13:38 2007 +0000

    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 87ecebd41bc1d46816e75408b4f8682703320a71..
index ..b1149cea3ca9902f5e25465a2817ae77d2aafc26 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 b904e2e49689f03c393ebdddab576839cf9f4320..
index ..2cbb806c98f76bc2ac2c7d8e7a2e7afa8efca087 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);
 	}

-----END OF PAGE-----