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

Re: [leafnode-list] Dropped delaybody - server doesn't like old title.

* Doug Laidlaw wrote:
> At Ralf's suggestion, I have switched "delaybody" mode off.  This is working 
> O.K.
> It would be convenient if I could download all the past bodies for one ng.  I 
> have tried unsubscribing, deleting everything relevant that I could find, 
> then subscribing again, but nothing works.  I seem to remember reading a 
> procedure somewhere.  Can anyone tell me what it is?

If applyfilter were not currently broken (see below), you could use
        applyfilter $GROUP
to remove all articles with empty bodies from that group, run
to remove the remaining message.id entries from crossposts (or groups
without crossposts this step is not necessary), then use
        fetchnews -x $NUMBER
to re-fetch $NUMBER old articles from $GROUP.  Since this will go back
in every group (but articles from other groups won't be fetched again,
merely their overview data), if you are brave you might try and edit
and reset the number after $GROUP to something lower.

Do not enable delaybody again during this procedure.

It's quite unfortunate that bugs in applyfilter show up just now.
Nobody must have used this tool for quite a while, these things just
could not have gone unnoticed altogether.  Below is a quick hack to make
it seemingly working (there a more flaws in that tool, sorry).
Don't use applyfilter with delaybody enabled -- will delete all articles
without bodies.  I'll try to come up with a decent patch for the next
version (and a fix for leafnode-2 as well).


diff -ru leafnode-1.9.20.rel/applyfilter.c leafnode-1.9.20.rel-patched/applyfilter.c
--- leafnode-1.9.20.rel/applyfilter.c	Thu Mar 21 11:41:33 2002
+++ leafnode-1.9.20.rel-patched/applyfilter.c	Thu Mar 28 09:24:27 2002
@@ -121,11 +121,12 @@
 	stat(de->d_name, &st);
 	if (S_ISREG(st.st_mode) && (f = fopen(de->d_name, "r")) != NULL) {
-	    (void)fread(l, sizeof(char), MAXHEADERSIZE, f);
+	    size_t sz = fread(l, sizeof(char), MAXHEADERSIZE, f);
 	    if (ferror(f)) {
 		printf("error reading %s\n", de->d_name);
+	    l[sz] = '\0';
 	    msgid = fgetheader(f, "Message-ID:");
 	    if ((k = strstr(l, "\n\n")) != NULL) {

leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list