🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #35148

Re: History botch in INN 2.2

#35148
From: bill davidsen
Date: Tue, 02 Feb 1999 00:00
50 lines
3083 bytes
In article <78l1lv$3ta0$1@newssvr03-int.news.prodigy.com>,
bill davidsen <davidsen@tmr.com> wrote:
| I have the release 2.2 installed on a small machine, and I'm getting  a
| botch in history lookup. If I start with a Message-ID, call it MID_1,
| and do a grephistory I get a token, call that TOK_1. If I then feed that
| token to sm and grep for Message-ID, I find another, diferent, id call
| it MID_2. If I then grephistory on that, I get another token, call that
| one TOK_2. If I do sm using that, I once again get MID_2.

The following patch to 2.2 seems to solve the problem. Note that this
does not solve the other 2.2 nnrpd in daemon mode problem I posted
earlier today.


From: thomasm@csl33.csl-gmbh.net

I guess I've found the reason for this behaviour (it happened to me too...):

When rebuilding, makehistory calls repeatedly cnfs_next(), which uses the
current cyclenum of the cycbuff to generate tokens for the history.
But for articles with offset values beyond the cycbuff->free pointer,
this should be cyclenum-1 . If such an article is later overwritten,
the new article gets the same token (it can't be differented by cyclenum),
so the storage manager returns the new article when requesting the old token...

The following one line patch (based on the current httpsync'ed source)
fixes this. Someone on the inn-workers list could please check if it
does this correctly ;-)

*** cnfs.c.orig Tue Jan 12 15:25:07 1999
--- cnfs.c  Tue Jan 26 14:11:43 1999
***************
*** 1628,1634 ****
      tonextblock = CNFS_BLOCKSIZE - (private->offset & (CNFS_BLOCKSIZE - 1));
      private->offset += (CYCBUFF_OFF_T) tonextblock;
      art->arrived = ntohl(cah.arrived);
!     token = CNFSMakeToken(cycbuff->name, offset, cycbuff->cyclenum, ntohl(cah.class), (TOKEN *)NULL);
      art->token = &token;
      if (innconf->articlemmap) {
    offset += sizeof(cah);
--- 1628,1634 ----
      tonextblock = CNFS_BLOCKSIZE - (private->offset & (CNFS_BLOCKSIZE - 1));
      private->offset += (CYCBUFF_OFF_T) tonextblock;
      art->arrived = ntohl(cah.arrived);
!     token = CNFSMakeToken(cycbuff->name, offset, (offset > cycbuff->free) ? cycbuff->cyclenum - 1 : cycbuff->cyclenum, cah.class, (TOKEN *)NULL);
      art->token = &token;
      if (innconf->articlemmap) {
    offset += sizeof(cah);

Technical Details
Message-ID: <795fj3$2744$1@newssvr04-int.news.prodigy.com>
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: <78l1lv$3ta0$1@newssvr03-int.news.prodigy.com>

Show Full Headers
Complete Article Headers
Message-ID: <795fj3$2744$1@newssvr04-int.news.prodigy.com>
Subject: Re: History botch in INN 2.2
Date: Tue, 02 Feb 1999 00:00:00 +0000
From: davidsen@tmr.com (bill davidsen)
References: <78l1lv$3ta0$1@newssvr03-int.news.prodigy.com>
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: 439557708
X-Auth-User: 000000000/addfe2f164136d92
X-Post-Time: 2 Feb 1999 00:06:59 GMT
Organization: TMR Associates, Schenectady NY
X-Problems-To: abuse@prodigy.net
Newsgroups: news.software.nntp
Originator: davidsen@darkstar.prodigy.com