[net.news.b] 2.10.1 expire

jsq@ut-sally.UUCP (10/03/83)

Does anybody have a working expire command for B news 2.10.1?
The one that comes with it contains comments about how it was
never converted from the 2.9 directory format, and indeed, it
doesn't do much of anything.
-- 
John Quarterman, CS Dept., University of Texas, Austin, Texas
{ihnp4,kpno,ctvax}!ut-sally!jsq, jsq@ut-sally.{ARPA,UUCP}

mark@cbosgd.UUCP (10/04/83)

2.10.1 expire does indeed work.  It's the -r and -h flags that were not
converted from 2.9.  If you're having trouble, read the manual page and
use the -v option to find out why.

There is a bug in the 2.10 expire that causes only the first link of an
article in multiple newsgroups to be unlinked.  The rest stay put.  This
causes your disk to eventually fill up.  I am unsure what the bug was but
have just installed sjk's version (with -r and -h fixed) and the bug seems
to have gone away.  I did have to fix a permission problem with the DBM files.

	Mark

henry@utzoo.UUCP (Henry Spencer) (10/09/83)

The expire bug Mark mentioned -- only the first link of an article
in multiple newsgroups gets unlinked -- is straightforward and easily
fixed.  If you examine the code in expire.c/ulall(), you will find
a chunk of ten or so lines inside "if (doarchive && ...) {".  If you
look it over carefully, you will see that it is using the variable
"p" as a temporary.  This is a botch because "p" has just been set
to a specific value, at considerable pain, and that value is being
used later in the recursive call.  The problem goes away if you set
up and use a new temporary char * variable -- say, "temp" -- for
the code inside the if.  More formally (line numbers approximate):

	348c348
	< 	char	*p;
	---
	> 	char	*p, *temp;
	382,383c382,383
	< 		p = fn + strlen(SPOOL) + 1;
	< 		sprintf(newname, "%s/%s", OLDNEWS, p);
	---
	> 		temp = fn + strlen(SPOOL) + 1;
	> 		sprintf(newname, "%s/%s", OLDNEWS, temp);

We just tested this mod and it works fine.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry