Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2005-01-25 16:42:13 UTC
Modified files:
ChangeLog configure configure.in doc/example.conf ircd/ircd.c
ircd/ircd_parser.y
Log message:
Configuration fixes. Repair automatic outbound connects.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.541 ircu2.10/ChangeLog:1.542
--- ircu2.10/ChangeLog:1.541 Mon Jan 24 17:36:14 2005
+++ ircu2.10/ChangeLog Tue Jan 25 08:41:54 2005
@@ -1,3 +1,19 @@
+2005-01-25 Michael Poole <[EMAIL PROTECTED]>
+
+ * 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 <[EMAIL PROTECTED]>
* configure.in: Make sure that $LEX and $YACC are reasonable and
Index: ircu2.10/configure
diff -u ircu2.10/configure:1.26 ircu2.10/configure:1.27
--- ircu2.10/configure:1.26 Mon Jan 24 17:36:23 2005
+++ ircu2.10/configure Tue Jan 25 08:41:57 2005
@@ -8786,13 +8786,15 @@
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 @@
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: ircu2.10/configure.in
diff -u ircu2.10/configure.in:1.25 ircu2.10/configure.in:1.26
--- ircu2.10/configure.in:1.25 Mon Jan 24 17:37:00 2005
+++ ircu2.10/configure.in Tue Jan 25 08:42:01 2005
@@ -19,7 +19,7 @@
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
dnl
-dnl $Id: configure.in,v 1.25 2005/01/25 01:37:00 entrope Exp $
+dnl $Id: configure.in,v 1.26 2005/01/25 16:42:01 entrope Exp $
dnl Make sure we are in the correct directory (someone could have run
dnl 'configure' with a wrong '--srcdir').
@@ -143,10 +143,12 @@
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 @@
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: ircu2.10/doc/example.conf
diff -u ircu2.10/doc/example.conf:1.43 ircu2.10/doc/example.conf:1.44
--- ircu2.10/doc/example.conf:1.43 Sun Jan 23 08:03:14 2005
+++ ircu2.10/doc/example.conf Tue Jan 25 08:42:02 2005
@@ -547,7 +547,7 @@
host = "1.2.3.4";
password = "passwd";
port = 4400;
- class = "Servers";
+ class = "Server";
hub;
};
Index: ircu2.10/ircd/ircd.c
diff -u ircu2.10/ircd/ircd.c:1.80 ircu2.10/ircd/ircd.c:1.81
--- ircu2.10/ircd/ircd.c:1.80 Sun Jan 23 08:03:15 2005
+++ ircu2.10/ircd/ircd.c Tue Jan 25 08:42:02 2005
@@ -19,7 +19,7 @@
*/
/** @file
* @brief Entry point and other initialization functions for the daemon.
- * @version $Id: ircd.c,v 1.80 2005/01/23 16:03:15 entrope Exp $
+ * @version $Id: ircd.c,v 1.81 2005/01/25 16:42:02 entrope Exp $
*/
#include "config.h"
@@ -260,7 +260,6 @@
*/
if (!(aconf->status & CONF_SERVER)
|| aconf->address.port == 0
- || aconf->hold == 0
|| ((ajupe = jupe_find(aconf->name)) && JupeIsActive(ajupe)))
continue;
@@ -278,11 +277,10 @@
* 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: ircu2.10/ircd/ircd_parser.y
diff -u ircu2.10/ircd/ircd_parser.y:1.35 ircu2.10/ircd/ircd_parser.y:1.36
--- ircu2.10/ircd/ircd_parser.y:1.35 Fri Jan 21 14:44:16 2005
+++ ircu2.10/ircd/ircd_parser.y Tue Jan 25 08:42:03 2005
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
- * $Id: ircd_parser.y,v 1.35 2005/01/21 22:44:16 isomer Exp $
+ * $Id: ircd_parser.y,v 1.36 2005/01/25 16:42:03 entrope Exp $
*/
%{
@@ -786,6 +786,7 @@
parse_error("Bad CRule block");
}
host = pass = NULL;
+ tconn = 0;
};
cruleitems: cruleitem cruleitems | cruleitem;
@@ -953,7 +954,7 @@
MyFree(pass);
MyFree(host);
pass = host = NULL;
- port = 0;
+ port = tconn = tping = 0;
};
iauthitems: iauthitem iauthitems | iauthitem;
----------------------- End of diff -----------------------