🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #72452

Re: Rebuilding overview for single group ?

#72452
From: Christian Kratzer
Date: Mon, 17 Oct 2005 06:57
65 lines
3828 bytes
Hi,

Russ Allbery <rra@stanford.edu> wrote:
[snipp]
> expire/makehistory.c and innd/art.c are the easiest places to make this
> change.

I hacked up a quick fix to expire/makehistory.c from inn-2.4.2 over the
weekend and used it to fix our overview corruption

--- makehistory.c.orig  Wed Dec 22 05:21:19 2004
+++ makehistory.c       Mon Oct 17 08:50:09 2005
@@ -507,6 +507,7 @@
     char                       overdata[BIG_BUFFER];
     char                       bytes[BIG_BUFFER];
     struct artngnum            ann;
+    char                       temp[SMBUF];

     /* Set up place to store headers. */
     for (fp = ARTfields, i = 0; i < ARTfieldsize; i++, fp++) {
@@ -526,7 +527,22 @@
        }
     }
     for (fp = ARTfields, i = 0; i < ARTfieldsize; i++, fp++) {
-        fp->Header = wire_findheader(art->data, art->len, fp->Headername);
+       p = wire_findheader(art->data, art->len, fp->Headername);
+       if(fp == Xrefp) {
+               /* ignore non local xref headers */
+               while(p && strncmp(innconf->pathhost,p,strlen(innconf->pathhost))) {
+                       q = wire_endheader(p, art->data + art->len - 1);
+                       len = (q-p)<sizeof(temp)-1 ? (q-p) : sizeof(temp)-1;
+                       strncpy(temp,p,len);
+                       if(len>2) temp[len-3]=0;
+                       warn("ignoring non local xref header %s in %s",temp,TokenToText(*art->token));
+                       if(q)
+                               p = wire_findheader(q, art->len-(q-art->data), fp->Headername);
+                       else
+                               p = q;
+               }
+       }
+       fp->Header = p;
         if (fp->Header != NULL) {
            fp->HasHeader = true;
             p = wire_endheader(fp->Header, art->data + art->len - 1);

the patch searches the article for xref headers until it finds one thats
begin matches innconf->pathhost.  

If you want to include this patch in future inns I can also email it as
an attachment.   Might be a good idea as lots of people will have their
spools polluted with stuff like this:

	Message-ID: <3inbh1lj9pcl6pdl9vgam1c31onp8996k5@4ax.com>
	X-Comments:  This message was posted through Newsfeeds.com
	Xref: spool6-east.superfeed.net comp.dcom.sys.cisco:273778
	Xref: spool6-east.superfeed.net comp.dcom.sys.cisco:273778
	Xref: ahven.cksoft.de comp.dcom.sys.cisco:5731

Greetings
Christian

-- 
Christian Kratzer                       ck+usenet@cksoft.de
CK Software GmbH                        http://www.cksoft.de/
Phone: +49 7452 889 135                 Fax: +49 7452 889 136
Technical Details
Message-ID: <divi0q$40t$1@news.germany.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.20140818.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.kamp.net!news.germany.com!not-for-mail
References: <did720$lvl$1@news.germany.com> <87fyr9f7l0.fsf@windlord.stanford.edu> <dil4t2$27q$1@news.germany.com> <87oe5tcqe8.fsf@windlord.stanford.edu>

Show Full Headers
Complete Article Headers
Message-ID: <divi0q$40t$1@news.germany.com>
Subject: Re: Rebuilding overview for single group ?
Date: Mon, 17 Oct 2005 06:57:30 +0000
From: Christian Kratzer <ck+usenet@cksoft.de>
References: <did720$lvl$1@news.germany.com> <87fyr9f7l0.fsf@windlord.stanford.edu> <dil4t2$27q$1@news.germany.com> <87oe5tcqe8.fsf@windlord.stanford.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.kamp.net!news.germany.com!not-for-mail
Newsgroups: news.software.nntp
Organization: Customers of Headlight GmbH
Lines: 65
Sender: Christian Kratzer <ck@news.germany.com>
NNTP-Posting-Host: news
X-Trace: news.germany.com 1129532250 4125 62.111.101.2 (17 Oct 2005 06:57:30
 GMT)
X-Complaints-To: usenet@news.germany.com
NNTP-Posting-Date: Mon, 17 Oct 2005 06:57:30 +0000 (UTC)
User-Agent: tin/1.7.7-20041215 ("Scalpay") (UNIX) (FreeBSD/6.0-CURRENT (i386))