[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [leafnode-list] tin: "Can't retrieve active" with 1.9.49.rel + 1.9.51.rel



Martin Klaiber schrieb am 2004-03-31:

> Yes, just checked again. I put debugmode = 3 into /etc/leafnode/config
> and didn't touch it while running the tests.

OK, got the bug + reproduced the problem with 1.9.51 and 1.9.52rc3 with
tin 1.6.2.

Leafnode prints a warning on stderr that gets sent over the wire with
the super server ([x]inetd) that you are using, other super servers only
send stdout and keep stderr local to the host.

This patch applies on top of 1.9.51.rel and 1.9.52.rc13 and fixes the
problem for me (it will cause one message, "Hunk #1 succeeded at 1724
(offset -3 lines).", on top of 1.9.51.rel, which is harmless).

Index: ln_log.c
===================================================================
RCS file: /var/CVS/leafnode-1/ln_log.c,v
retrieving revision 1.4
diff -u -r1.4 ln_log.c
--- ln_log.c	5 Feb 2004 01:08:51 -0000	1.4
+++ ln_log.c	31 Mar 2004 18:47:18 -0000
@@ -23,6 +23,12 @@
 #define LOG_CONS 0
 #endif
 
+static int maylog_console = 1; /* if 0, ln_log* stuff will not log to consoles */
+
+void ln_log_use_console(int en) {
+    maylog_console = en;
+}
+
 static void vln_log_core(int slg, FILE /*@null@*/ * console,
 			 int severity,
 			 int context, const char *format, va_list ap);
@@ -80,7 +86,7 @@
 	    abort();
     }
 
-    if (console) {
+    if (console && maylog_console) {
 	/* always log LNLOG_SERR and more severe,
 	   regardless of verbosity */
 	if (context <= verbose+1 || severity <= LNLOG_SERR) {
Index: ln_log.h
===================================================================
RCS file: /var/CVS/leafnode-1/ln_log.h,v
retrieving revision 1.3
diff -u -r1.3 ln_log.h
--- ln_log.h	5 Feb 2004 01:08:51 -0000	1.3
+++ ln_log.h	31 Mar 2004 18:47:18 -0000
@@ -29,7 +29,8 @@
 extern int verbose;
 
 /* EXPORT */
-extern void ln_log_open(const char *ident);
+extern void ln_log_open(const char *ident);	/** open log, use \a ident as log tag */
+extern void ln_log_use_console(int en);		/** allow logging to console depending on \a en */
 
 /* log to stderr and syslog */
 extern void ln_log(int severity, int context, const char *format, ...)
Index: nntpd.c
===================================================================
RCS file: /var/CVS/leafnode-1/nntpd.c,v
retrieving revision 1.111
diff -u -r1.111 nntpd.c
--- nntpd.c	28 Mar 2004 04:49:13 -0000	1.111
+++ nntpd.c	31 Mar 2004 18:47:18 -0000
@@ -1727,6 +1727,7 @@
     char ownip[ADDRLEN]; /* RATS: ignore */
     char origfqdn[FQDNLEN + 1]; /* RATS: ignore */
 
+    ln_log_use_console(0); /* disable console logging */
     (void)argc;	/* quiet compiler warning */
     myopenlog("leafnode");
 

> I'll do the same test with tin-1.6.2, but probably not today anymore.

Not necessary.

-- 
Matthias Andree

Encrypt your mail: my GnuPG key ID is 0x052E7D95
-- 
_______________________________________________
leafnode-list mailing list
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
http://www.dt.e-technik.uni-dortmund.de/mailman/listinfo/leafnode-list
http://leafnode.sourceforge.net/