🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #7941

Expire patch fixes "Bad Entry" messages

#7941
From: Mike Bird
Date: Fri, 24 May 1996 00:00
60 lines
2674 bytes
[Posted to news.software.nntp]

05/13 I posted a patch here containing a fix for the poison pill
expire but it didn't fix "Bad Entry" messages.  This new patch works
with my version of poison pill and will probably fix bill@twwells.com
version too.

The EXPsplit function previously could not report a count of zero
postings for a history "cancel" entry.  This was covered in the
original expire code by a "shouldn't happen" test.  bill@twwells.com
left out the "shouldn't happen" code in his version and I moved the
EXPkeepit call out of the area protected by the test.  Although some
more "shouldn't happen" tests would fix the problem, it seems more
elegant to allow EXPsplit to report zero when that is the case.

The danger of this fix is that there may be other code that relies on
EXPsplit returning one when no fields are present - but I can't find
any and it seems to work OK.

INND writes "cancel" entries with an empty third field.  Expire seems
to convert these to "remembered" entries with only two fields.  This
seems to work but I don't understand why there are two formats -
perhaps for debugging or historical reasons.  (This conversion means
that running one expire shortly after another may not encounter any
cancels in their original format - which is why I originally thought
the bug was fixed when it wasn't.)

An alternative patch might be to have INND write two-field
"remembered" entries for cancels.

--Mike

--- expire.c.SAFE	Thu May 23 04:59:59 1996
+++ expire.c	Thu May 23 05:15:05 1996
@@ -252,6 +252,15 @@
 {
     register int	i;
 
+    if (!p)
+      return 0;
+
+    while (*p == sep)
+      ++p;
+
+    if (!*p)
+      return 0;
+
     for (i = 1, *argv++ = p; *p; )
 	if (*p++ == sep) {
 	    if (++i == count)


----------------------------------------------------------
 Mike Bird          Tel: 209-742-5000   FAX: 209-966-3177
 President          POP: 209-742-5333   NOC: 209-742-9979 
 Iron Mtn Systems      http://www.ims.mariposa.ca.us/


Technical Details
Message-ID: <4o4a72$2bt@news.ims.mariposa.ca.us>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <Dqp091.7q3@twwells.com> <4m6tue$5rp@sunrise.gv.ssi1.com> <DqrFKK.DCr@twwells.com> <4n8oib$4hc@news.ims.mariposa.ca.us>

Show Full Headers
Complete Article Headers
Message-ID: <4o4a72$2bt@news.ims.mariposa.ca.us>
Subject: Expire patch fixes "Bad Entry" messages
Date: Fri, 24 May 1996 00:00:00 +0000
From: mgb@ims.mariposa.ca.us (Mike Bird)
References: <Dqp091.7q3@twwells.com> <4m6tue$5rp@sunrise.gv.ssi1.com> <DqrFKK.DCr@twwells.com> <4n8oib$4hc@news.ims.mariposa.ca.us>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 156511478
Organization: Iron Mtn Systems
Newsgroups: news.software.nntp