ekb (01/12/83)
As promised, here are the changes that I made to our local copy of
expire.c (2.10 6/21/82). These changes keep expire from deleting
the history file lines for control articles until after the default
expiration period. If a sufficient number of sites install these
changes, it should solve the problem we've had with control articles
echoing through the net!
- Eric Bustad (houx*!machaids!ekb)
*** old.expire.c Sun Dec 5 14:06:38 1982
--- new.expire.c Tue Dec 7 10:44:03 1982
***************
*** 32,38
register time_t now, newtime;
char ngpat[LBUFLEN];
char afline[BUFLEN];
! char *p1, *p2;
FILE *ohfd, *nhfd;
expincr = DFLTEXP;
--- 32,38 -----
register time_t now, newtime;
char ngpat[LBUFLEN];
char afline[BUFLEN];
! char *p1, *p2, *ctldate;
FILE *ohfd, *nhfd;
expincr = DFLTEXP;
***************
*** 94,99
if (verbose > 2)
printf("article: %s", afline);
p1 = index(afline, '\t');
if (p1)
p2 = index(p1+1, '\t');
else
--- 94,100 -----
if (verbose > 2)
printf("article: %s", afline);
p1 = index(afline, '\t');
+ ctldate = p1+1;
if (p1)
p2 = index(p1+1, '\t');
else
***************
*** 105,112
p1 = index(groupdir, '/');
if (p1)
*p1 = 0;
! else
continue;
ngcat(groupdir);
if (!ngmatch(groupdir, ngpat)) {
fputs(afline, nhfd);
--- 106,119 -----
p1 = index(groupdir, '/');
if (p1)
*p1 = 0;
! else {
! strcpy(groupdir, ctldate);
! *(index(groupdir,'\t')) = '\0';
! newtime = cgtdate(groupdir) + expincr;
! if (now < newtime)
! fputs(afline, nhfd);
continue;
+ }
ngcat(groupdir);
if (!ngmatch(groupdir, ngpat)) {
fputs(afline, nhfd);