Configuration fixes. Repair automatic outbound connects.
authorMichael Poole <mdpoole@troilus.org>
Tue, 25 Jan 2005 16:42:03 +0000 (16:42 +0000)
committerMichael Poole <mdpoole@troilus.org>
Tue, 25 Jan 2005 16:42:03 +0000 (16:42 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1305 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
configure
configure.in
doc/example.conf
ircd/ircd.c
ircd/ircd_parser.y

index 7659815750e8e0009f4c9b987e99bf3812e5f9df..7e6b073865eff4ba0b4f2619b2c77c3ad8e01f85 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2005-01-25  Michael Poole <mdpoole@troilus.org>
+
+       * configure.in: Fix typos and thinkos in previous commut.
+
+       * configure: Regenerate.
+
+       * doc/example.conf: Change class name in Connect block to be
+       consistent with earlier Class block.
+
+       * ircd/ircd.c (try_connections): Consider Connect blocks with hold
+       time of 0.  Fix Links() vs MaxLinks() comparison to reflect ref
+       count starting at 1.
+
+       * ircd/ircd_parser.y (cruleblock, iauthblock): Clear unused
+       variables after use.
+
 2005-01-24  Michael Poole <mdpoole@troilus.org>
 
        * configure.in: Make sure that $LEX and $YACC are reasonable and
index ba2cf8c8f678978a0214bfb0e7370904c360c5a4..d6984de97436665532349cda21395cd58e43c505 100755 (executable)
--- a/configure
+++ b/configure
@@ -8786,13 +8786,15 @@ _ACEOF
 fi
 
 fi
-if  "$LEX" eq ":"  ; then
+if test "$LEX" = ":" ; then
   { { echo "$as_me:$LINENO: error: Cannot find flex." >&5
 echo "$as_me: error: Cannot find flex." >&2;}
    { (exit 1); exit 1; }; }
 elif echo "" | $LEX -V -v --version > /dev/null 2>&1 ; then
-  { { echo "$as_me:$LINENO: error: Cannot find flex." >&5
-echo "$as_me: error: Cannot find flex." >&2;}
+  :
+else
+  { { echo "$as_me:$LINENO: error: Cannot use $LEX as flex." >&5
+echo "$as_me: error: Cannot use $LEX as flex." >&2;}
    { (exit 1); exit 1; }; }
 fi
 
@@ -8851,13 +8853,15 @@ fi
 done
 test -n "$YACC" || YACC="yacc"
 
-if  "$YACC" eq ":"  ; then
+if test "$YACC" = ":" ; then
   { { echo "$as_me:$LINENO: error: Cannot find yacc." >&5
 echo "$as_me: error: Cannot find yacc." >&2;}
    { (exit 1); exit 1; }; }
 elif echo "" | $YACC -V -v --version > /dev/null 2>&1 ; then
-  { { echo "$as_me:$LINENO: error: Cannot find yacc." >&5
-echo "$as_me: error: Cannot find yacc." >&2;}
+  :
+else
+  { { echo "$as_me:$LINENO: error: Cannot use $YACC as yacc." >&5
+echo "$as_me: error: Cannot use $YACC as yacc." >&2;}
    { (exit 1); exit 1; }; }
 fi
 
index 2532dfbe084575c399198c5ec824ec2283f3e045..531c045f226776d9942a9fbce0e7acaf3717be30 100644 (file)
@@ -143,10 +143,12 @@ AC_PATH_PROGS(SHPROG, sh, /bin/sh)
 dnl (F)LEX - needed for the new conf file parser
 AC_PROG_LEX
 dnl The autoconf docs say $LEX defaults to 'lex'.  They lie.
-if [ "$LEX" eq ":" ] ; then
+if test "$LEX" = ":" ; then
   AC_MSG_ERROR([Cannot find flex.])
 elif echo "" | $LEX -V -v --version > /dev/null 2>&1 ; then
-  AC_MSG_ERROR([Cannot find flex.])
+  :
+else
+  AC_MSG_ERROR([Cannot use $LEX as flex.])
 fi
 
 if test -z "$LEXLIB" ; then
@@ -161,10 +163,12 @@ dnl YACC - ditto
 AC_PROG_YACC
 dnl The autoconf docs say $YACC defaults to 'yacc'.  This seems to be true,
 dnl but judging from AC_PROG_LEX, it may not stay true.
-if [ "$YACC" eq ":" ] ; then
+if test "$YACC" = ":" ; then
   AC_MSG_ERROR([Cannot find yacc.])
 elif echo "" | $YACC -V -v --version > /dev/null 2>&1 ; then
-  AC_MSG_ERROR([Cannot find yacc.])
+  :
+else
+  AC_MSG_ERROR([Cannot use $YACC as yacc.])
 fi
 
 
index ee44712c8d1d1913751517f65bf0de8863611352..8b269d07c251bcb845567469a3fdd0550faf5985 100644 (file)
@@ -547,7 +547,7 @@ Connect {
  host = "1.2.3.4";
  password = "passwd";
  port = 4400;
- class = "Servers";
+ class = "Server";
  hub;
 };
 
index db6c6040f38aabf9d9a7a3d4fc95d14e170f14a5..d43f2b33062d8cb12d845f194705b6d84063fe39 100644 (file)
@@ -260,7 +260,6 @@ static void try_connections(struct Event* ev) {
      */
     if (!(aconf->status & CONF_SERVER)
         || aconf->address.port == 0
-        || aconf->hold == 0
         || ((ajupe = jupe_find(aconf->name)) && JupeIsActive(ajupe)))
       continue;
 
@@ -278,11 +277,10 @@ static void try_connections(struct Event* ev) {
      * or if connect rules forbid a link now.
      */
     if (hold
-        || (Links(cltmp) >= MaxLinks(cltmp))
+        || (Links(cltmp) > MaxLinks(cltmp))
         || FindServer(aconf->name)
-        || conf_eval_crule(aconf->name, CRULE_MASK)) {
+        || conf_eval_crule(aconf->name, CRULE_MASK))
       continue;
-    }
 
     /* Ensure it is at the end of the list for future checks. */
     if (aconf->next) {
index d47a9414787bb5c61e8d79f59160acc6dcf05be9..2ae4a1b96effbb787b5e6de185382c31493bf696 100644 (file)
@@ -786,6 +786,7 @@ cruleblock: CRULE
     parse_error("Bad CRule block");
   }
   host = pass = NULL;
+  tconn = 0;
 };
 
 cruleitems: cruleitem cruleitems | cruleitem;
@@ -953,7 +954,7 @@ iauthblock: IAUTH '{'
   MyFree(pass);
   MyFree(host);
   pass = host = NULL;
-  port = 0;
+  port = tconn = tping = 0;
 };
 
 iauthitems: iauthitem iauthitems | iauthitem;