🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #46529

diablo Xref generation for control msgs (patch)

#46529
From: Steve Wyles
Date: Sat, 20 May 2000 00:00
56 lines
2546 bytes
Guys,

	Unfortunately it seems that Xref header generation for control
messages is still broken in diablo-2.0-STABLE-20000517-01 and the previous
snapshot. This becomes very apparent if you are using diablo to assign
article numbers (active on), feeding INN reader machines in xrefslave
mode.

	I thought this had already been fixed in diablo-2.0-REL, but it
appears that somewhere it has been missed out of the later snapshots. The
patch below (I've submitted this before) fixes the problem.

--- active.c.old	Thu May 11 12:11:06 2000
+++ active.c	Thu May 11 12:19:49 2000
@@ -59,7 +59,14 @@
 	    group[i] = 0;
 	    rec = KPDBReadRecord(DActiveDB, group, KP_LOCK, &recLen);
 
-	    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);
@@ -85,7 +92,14 @@
 		} 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
Senior UNIX Systems Administrator
GTS Netcom

Technical Details
Message-ID: <8g61vp$c0v$1@lyonesse.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: <8g61vp$c0v$1@lyonesse.netcom.net.uk>
Subject: diablo Xref generation for control msgs (patch)
Date: Sat, 20 May 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: 625723175
X-Complaints-To: abuse@corp.netcom.net.uk
X-Trace: lyonesse.netcom.net.uk 958827321 12319 194.42.224.25 (20 May 2000 12:55:21 GMT)
Organization: GTS Netcom
User-Agent: tin/1.4.2-20000205 ("Possession") (UNIX) (SunOS/5.7 (sun4u))
NNTP-Posting-Date: 20 May 2000 12:55:21 GMT
Newsgroups: news.software.nntp