🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #44842

Diablo 1.28-REL --> INN (437 Invalid Xref header)

#44842
From: Steve Wyles
Date: Mon, 06 Mar 2000 00:00
80 lines
3594 bytes
	We have just moved from a INN peering machine to one running
Diablo. The INN reader machines it feeds are running in Xrefslave mode
with the Diablo peer using an active file and assigning the article
numbers for them.

	It seems sometime in a past release of Diablo (1.18?) the way it
handles control messages and assigns the article numbers for them changed.
This results in it creating a very strange Xref header.

Instead of:

	Xref: machine.name.here group1:##### group2:##### 

It creates:

	Xref: machine.name.here

A patch against lib/active.c to fix this problem is below, it's not the
most tidy fix in the world, but it does work... comments?

-----------------------------------------------------------------------------

--- active.c.old        Mon Mar  6 12:12:01 2000
+++ active.c    Mon Mar  6 18:25:29 2000
@@ -57,16 +57,14 @@
            group[i] = 0;
            rec = KPDBReadRecord(DActiveDB, group, KP_LOCK, &recLen);
 
-           if (rec != NULL && ctl[0]) {
-               /* 
-                * Control messages aren't entered into groups so no
-                * XRef: is generated for groups, but we still keep track
-                * of whether the control message was posted to a group
-                * we know about.
-                */
-               ++count;
-               KPDBUnlock(DActiveDB, rec);
-           } else if (rec != NULL) {
+/*     Control messages are special, Xref header is still required, but */
+/*     must only contain control.* groups. Therefore, for non control   */
+/*     messages, process as normal. But, only the control group is put  */
+/*     in the Xref for control messages.                                */
+
+               if ((rec != NULL && !ctl[0])
+        || (rec != NULL && ctl[0] && (strncmp("control",group,7) == 0)))
+                {
                int f1len;
                int f2len;
                const char *f1 = KPDBGetField(rec, recLen, "NE", &f1len, NULL);
@@ -89,10 +87,17 @@
                    sprintf(buf, "%d", n);
                    bwrite(b, buf, strlen(buf));
                    ++count;
-               } else {
+               } else { 
                    KPDBUnlock(DActiveDB, rec);
                }
-           }
+
+/*     Now catch the non control groups that were listed for a control */
+/*      message and unlock the active file.                            */
+
+           } else if (rec != NULL && ctl[0]) {
+                       ++count;
+                       KPDBUnlock(DActiveDB, rec);
+                    }
        }
        p += i;
        if (*p != ',')

---------------------------------------------------------------------------

Steve

-- 
Steve Wyles
Computer Operations
NETCOM Internet Ltd

Technical Details
Message-ID: <8a18ka$7v7$1@taliesin2.netcom.net.uk>
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

Show Full Headers
Complete Article Headers
Message-ID: <8a18ka$7v7$1@taliesin2.netcom.net.uk>
Subject: Diablo 1.28-REL --> INN (437 Invalid Xref header)
Date: Mon, 06 Mar 2000 00:00:00 +0000
From: Steve Wyles <stevew@ops.netcom.net.uk>
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: 593977898
X-Complaints-To: abuse@corp.netcom.net.uk
X-Trace: taliesin2.netcom.net.uk 952378826 8167 194.42.224.25 (6 Mar 2000 21:40:26 GMT)
Organization: (Posted via) Netcom Internet Ltd.
User-Agent: tin/pre-1.4-19990216 ("Styrofoam") (UNIX) (SunOS/5.7 (sun4u))
NNTP-Posting-Date: 6 Mar 2000 21:40:26 GMT
Newsgroups: news.software.nntp