git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1294
c9e4aea6-c8fd-4c43-8297-
357d70d61c8c
-2005-01-13 Michael Poole <mdpoole@troilus.org>
+2005-01-03 Michael Poole <mdpoole@troilus.org>
+
+ * ircd/ircd.c (try_connections): Test Connect hold time before
+ updating it (spotted by Kev).
+
+2005-01-03 Michael Poole <mdpoole@troilus.org>
* Makefile.in: Add ircd/test as a subdirectory.
* Makefile.in: Add ircd/test as a subdirectory.
time_t next = 0;
struct ConnectionClass* cltmp;
struct Jupe* ajupe;
time_t next = 0;
struct ConnectionClass* cltmp;
struct Jupe* ajupe;
assert(ET_EXPIRE == ev_type(ev));
assert(0 != ev_timer(ev));
assert(ET_EXPIRE == ev_type(ev));
assert(0 != ev_timer(ev));
/* Update the next time we can consider this entry. */
cltmp = aconf->conn_class;
/* 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,
* or if connect rules forbid a link now.
*/
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,
* or if connect rules forbid a link now.
*/
- if ((aconf->hold > CurrentTime)
|| (Links(cltmp) >= MaxLinks(cltmp))
|| FindServer(aconf->name)
|| (Links(cltmp) >= MaxLinks(cltmp))
|| FindServer(aconf->name)
- || conf_eval_crule(aconf->name, CRULE_MASK))
+ || conf_eval_crule(aconf->name, CRULE_MASK)) {
/* Ensure it is at the end of the list for future checks. */
if (aconf->next) {
/* Ensure it is at the end of the list for future checks. */
if (aconf->next) {