🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #82639

Re: unrelated possible bug with C flag? - was Re: feedtrash

#82639
From: D. Stussy
Date: Fri, 22 Jan 2010 00:25
38 lines
2555 bytes
innd/art.c - about line 2197:  Computation of "data->Followcount"

Does NOT recognize "poster" as a reserved word per RFC 5536 where the
followup count of groups should be ZERO.

Fix:  About line 2197 (INN 2.5.1) in ARTpost()

 --- innd/art.c 2009-01-01 10:02:51.000000000 +0000
+++ innd/art.c 2010-01-22 00:12:51.000000000 +0000
@@ -2197,9 +2197,16 @@
     for (i = 0, p = HDR(HDR__FOLLOWUPTO) ; (p = strchr(p, ',')) != NULL ;
       i++, p++)
       continue;
-    data->Followcount = i;
-  }
-  if (data->Followcount == 0)
+    switch(i) {
+      case 1:
+         if (!stricmp(HDR(HDR__FOLLOWUPTO),"poster")) i=0;
+      default:
+         data->Followcount = i;
+         break;
+      case 0:
+         data->Followcount = data->Groupcount;
+    }
+  }  else
     data->Followcount = data->Groupcount;

   groups = data->Newsgroups.List;


Case insensitivity acceptance is an option per RFC 5536.  I assume that the
header's data field has had all leading and trailing whitespace stripped.

I have not addressed any BUG in the for() loop above - are we "off by one"?
It seems as if we're counting COMMAS, not groups.

Technical Details
Message-ID: <hjar9t$mq$1@snarked.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!feeder.news-service.com!news.mixmin.net!news.k-dsl.de!news.snarked.org!not-for-mail
References: <hic74m$vi8$1@news.trigofacile.com> <hicf9f$ntj$1@snarked.org> <hiclo9$dd4$1@news.trigofacile.com> <hidmvp$vh1$1@snarked.org> <hitipd$rtb$1@news.trigofacile.com> <hiu2ar$707$1@snarked.org> <hiun2p$2mt$1@news.trigofacile.com> <hj0m9c$g98$1@snarked.org> <hj7qh0$ggu$1@news.trigofacile.com> <hj8csn$cok$1@snarked.org> <hjaiid$f7c$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <hjar9t$mq$1@snarked.org>
Subject: Re: unrelated possible bug with C flag? - was Re: feedtrash
Date: Thu, 21 Jan 2010 16:25:36 -0800
From: "D. Stussy" <spam+newsgroups@bde-arc.ampr.org>
References: <hic74m$vi8$1@news.trigofacile.com> <hicf9f$ntj$1@snarked.org> <hiclo9$dd4$1@news.trigofacile.com> <hidmvp$vh1$1@snarked.org> <hitipd$rtb$1@news.trigofacile.com> <hiu2ar$707$1@snarked.org> <hiun2p$2mt$1@news.trigofacile.com> <hj0m9c$g98$1@snarked.org> <hj7qh0$ggu$1@news.trigofacile.com> <hj8csn$cok$1@snarked.org> <hjaiid$f7c$1@news.trigofacile.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.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!feeder.news-service.com!news.mixmin.net!news.k-dsl.de!news.snarked.org!not-for-mail
Newsgroups: news.software.nntp
Lines: 38
Reply-To: "D. Stussy" <replies@newsgroups.kd6lvw.ampr.org>
NNTP-Posting-Host: 71.118.51.220
X-Trace: snarked.org 1264119933 730 71.118.51.220 (22 Jan 2010 00:25:33 GMT)
X-Complaints-To: newsmaster+complaints@snarked.org
NNTP-Posting-Date: Fri, 22 Jan 2010 00:25:33 +0000 (UTC)
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1478
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478