🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
2 messages
2 total messages Started by Steve Wyles Mon, 06 Mar 2000 00:00
Diablo 1.28-REL --> INN (437 Invalid Xref header)
#44842
Author: 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

Re: Diablo 1.28-REL --> INN (437 Invalid Xref header)
#44871
Author: Steve Wyles
Date: Tue, 07 Mar 2000 00:00
34 lines
1600 bytes
Of course this code in util/diablo.c

ngAddControl(char *nglist, int ngSize, const char *ctl)
{
    /*
     * If a control message, append 'control.CTLNAME' to grouplist
     */
    int l = strlen(nglist);

    if (l && nglist[l-1] == '\n')
        --l;

    if (strlen(ctl) + l < ngSize - 11)
        sprintf(nglist + l, ",control.%s", ctl);
}

shouldn't add the group to nglist if it already exists on the Newsgroups
line, otherwise you get this:

head <jbuRtH7h$GA.54@cppssbbsa01.microsoft.com>
221 0 head <jbuRtH7h$GA.54@cppssbbsa01.microsoft.com>

	[snipped non important headers]

 Xref: diablo.netcom.net.uk control.rmgroup:94715 control.rmgroup:94716

Steve

-- 
Steve Wyles
Computer Operations
NETCOM Internet Ltd

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads