Author: Alex Badea <vamposdecampos@gmail.com>
authorAlex Badea <vamposdecampos@gmail.com>
Mon, 12 Sep 2005 22:52:01 +0000 (22:52 +0000)
committerAlex Badea <vamposdecampos@gmail.com>
Mon, 12 Sep 2005 22:52:01 +0000 (22:52 +0000)
Log message:

Fixed autoreconnect not working with certain combinations of
FEAT_CONNECTFREQUENCY and Class connectfreq. This may require
further testing.

git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1483 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/ircd.c

index f927cd44c9407af18068adf074e361db5d25eba5..72f90dad4507c60996b51b3ca675b8dc2899bddb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-09-13  Alex Badea <vamposdecampos@gmail.com>
+
+       * ircd/ircd.c (try_connections): modify autoreconnect logic to
+       allow FEAT_CONNECTFREQUENCY to be smaller than Class connectfreq
+
 2005-09-13  Alex Badea <vamposdecampos@gmail.com>
 
        * ircd/s_conf.c (close_mappings): NULL out GlobalServiceMapList,
index b1f87b74f1be4a579e0ae5e3a0357d5f61a468cc..3ef0cdd9a5d36eb5628618952f09e96c65d9e428 100644 (file)
@@ -269,14 +269,14 @@ static void try_connections(struct Event* ev) {
         || ((ajupe = jupe_find(aconf->name)) && JupeIsActive(ajupe)))
       continue;
 
+    /* Do we need to postpone this connection further? */
+    hold = aconf->hold > CurrentTime;
+
     /* Update next possible connection check time. */
-    if (next > aconf->hold || next == 0)
+    if (hold && (next > aconf->hold || next == 0))
         next = aconf->hold;
 
-    /* Update the next time we can consider this entry. */
     cltmp = aconf->conn_class;
-    hold = aconf->hold > CurrentTime; /* before we update aconf->hold */
-    aconf->hold = ConFreq(cltmp) ? CurrentTime + ConFreq(cltmp) : 0;
 
     /* Do not try to connect if its use is still on hold until future,
      * too many links in its connection class, it is already linked,