[leafnode-list] texpire failing to expire

Matthias Andree ma at dt.e-technik.uni-dortmund.de
Thu Sep 30 10:28:40 CEST 2004


Robert Marshall <robert at chezmarshall.freeserve.co.uk> writes:

> Works for me (finally gets alt.f.c under control!), thanks for sorting
> this out - it looks a little scary though! :
>
> alt.folklore.computers: 0 articles deleted, 0 kept, interesting
> gnu.emacs.gnus: 0 articles deleted, 0 kept, interesting
> usw _all_ with 0 kept
> ....
> message.id: 0 articles deleted, 27760 kept
>
> whew!
> there was only the one output line on a grep "[0-9][0-9] kept"

Indeed, the new "-a" mode defeated the "kept" counters.

Add this patch on top of the previous to fix this problem:

Index: texpire.c
===================================================================
RCS file: /var/CVS/leafnode-2/texpire.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- texpire.c	28 Sep 2004 22:27:21 -0000	1.53
+++ texpire.c	30 Sep 2004 08:22:20 -0000	1.54
@@ -101,8 +101,9 @@
     struct rnode *nhash;	/* next rnode in this hash list */
     struct rnode *nthread;	/* next rnode in this thread */
     struct thread *fthread;	/* start of this thread */
-    unsigned long artno;	/* article number, 0 if unknown */
     const char *mid;		/* Message-ID */
+    unsigned long artno;	/* article number, 0 if unknown */
+    int	noexpire;		/* prevent expiry */
 };
 
 struct thread {
@@ -170,6 +171,7 @@
     newn->fthread = NULL;
     newn->artno = artno;
     newn->mid = mid;
+    newn->noexpire = 0;
     return newn;
 }
 
@@ -274,7 +276,7 @@
 {
     char name[64];
 
-    if (!r || !r->artno) {
+    if (!r || !r->artno || r->noexpire) {
 	return;
     }
     str_ulong(name, r->artno);
@@ -416,8 +418,7 @@
 			/* no need to look further */
 			break;
 		    } else {
-			/* prevent this article from expiry */
-			r->artno = 0;
+			r->noexpire = 1;
 		    }
 		}
 	    }


-- 
Matthias Andree

Encrypted mail welcome: my GnuPG key ID is 0x052E7D95 (PGP/MIME preferred)



More information about the leafnode-list mailing list