From: wusel@hactar.hanse.de (Kai 'wusel' Siering)
Newsgroups: alt.sys.amiga.uucp
Subject: Re: Cnews questions
Date: Fri, 11 Dec 1992 16:15:48 +0100
Reply-To: "Kai 'wusel' Siering" <wusel@hactar.hanse.de>
Organization: Villa Straylight, Hamburg, FRG
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: Arn V1.00 pre

In article <vSk5s*sz6@kink.PhaedraV.On.Ca>, Hugh D. Gamble writes:

% In article <5d4e.ANN@chumly.ka.sub.org>, Walter Mildenberger writes:
%
% > *DON'T* use `f', use `F' instead. Under some bizarre circumstances
% > relaynews calculates a wrong articlesize, which *will* confuse the next
% > rnews/relaynews/whatever. (I never actually tracked down the bug, since
% > it is so easy to bypass.) I don't know if wusel did fix the bug, but the
% > old port by Crash Edwards had this bug.
%
% I tracked it down, but never fixed it because it was going to be a
% pain, and I wasn't batching enough news for the added cost of using

     I hope it won't =:-> I made a quick change to hdrmunge.c and, at
least after FEW local tests, it seems to work ...

cn:relay/hdrmunge.c
---------------------------------------8<---------------------------------------
[...]
/*
 * Generate an Xref: header from art->a_files.
 * Turn slashes in art->a_files into colons in Xref:.
 */
void
emitxref(art)
register struct article *art;
{
        register char *slashp, *xrefs;

        if (!art->a_xref) {
                art->a_xref = YES;
                xrefs = strsave(art->a_files);
                for (slashp = xrefs; (slashp = strchr(slashp, FNDELIM)) != NULL; )
                        *slashp++ = ':';
                if (fprintf(art->a_artf, "%s %s %s\n",
                    xrefhdr.hdrnm, hostname(), xrefs) == EOF)
                        fulldisk(art, spoolnm(art));
#ifdef WUSEL
                else
                         art->a_charswritten += strlen(xrefhdr.hdrnm)+strlen(hostname())+strlen(xrefs)+3;
#endif
                free(xrefs);
        }
}
[...]
--------------------------------------->8---------------------------------------

     I quickly looked into the performance release sources to see if it
has been obviously fixed there, but at least not in the way I would have
been expected =:->

% "F" to amount to much, and because there are so many other things I'd
% like to fix in that port that I'm planning to do a clean port from
% scratch one of these days.

     I agree (and plan so, too -- but with an amiga-ized C compiler,
either DICE or SAS/C, not with GCC), but until I have the time to do so,
I'll try to keep the beast working ...

% The problem is that relaynews calculates the article length before the
% xref line gets added. This means that any locally posted articles that
% are crossposted will have the wrong length and get thrown out by
% upstream sites.

     If there's nothing I overlooked (will make more tests next week), it
should work with the above change ...

Regards,
			kai

--  _
 _ //   Kai 'wusel' Siering, Villa Straylight, Hamburg, Germany. Go for MIME!
 \X/: <wusel@hactar.hanse.de>  Exile: <wusel@wolfhh.hanse.de>  iso-8859-1: 

"Das  Schicksal  beschuetzt  Narren,  kleine  Kinder ... und Raumschiffe mit dem
Namen `Enterprise'."         -- William Riker, "Star Trek - The Next Generation"