[leafnode-list] Patch: leafnode says active file has to be refetched but it doesn't

Brian Sammon leafnode-list at brisammon.fastmail.fm
Wed Nov 9 18:11:13 CET 2005


In some circumstances, when fetchnews can't connect to a server, fetchnews 
decides that the active file must be refetched even though it wouldn't have 
tried to fetch the active file if it had connected.  Specifically if it's a -P 
run or if the server is marked noread.
I've attached a patch for this.  I've also created a patch to make the error a 
little clearer.  Since both patches modify the same part of the program, the 
second patch will only apply after the first one has been applied.

-------------- next part --------------
--- fetchnews.c.orig	2005-11-08 17:54:11.000000000 -0500
+++ fetchnews.c	2005-11-08 17:56:50.000000000 -0500
@@ -2500,7 +2500,8 @@ main(int argc, char **argv)
 	} else { /* reply = nntpconnect */
 	    if (verbose)
 		printf("%s: connection failed.\n", current_server->name);
-	    if (forceactive && current_server->updateactive) {
+	    if (forceactive && current_server->updateactive && !postonly &&
+		!current_server->noread) {
 		error_refetch("fetching the active list from a server failed.");
 		need_refetch = 1;
 	    }
-------------- next part --------------
--- fetchnews.c	2005-11-08 17:56:50.000000000 -0500
+++ fetchnews.c.new	2005-11-08 17:55:48.000000000 -0500
@@ -2502,7 +2502,7 @@ main(int argc, char **argv)
 		printf("%s: connection failed.\n", current_server->name);
 	    if (forceactive && current_server->updateactive && !postonly &&
 		!current_server->noread) {
-		error_refetch("fetching the active list from a server failed.");
+		error_refetch("needed to fetch the active list from the server but couldn't 
connect.");
 		need_refetch = 1;
 	    }
 	    rc = 2;


More information about the leafnode-list mailing list