From:	CRDGW2::CRDGW2::MRGATE::"SMTP::VM1.NODAK.EDU::ANU-NEWS"  8-JUN-1991 12:30:54.82
To:	ARISIA::EVERHART
CC:	
Subj:	Re: Misuse, confusion, re "Distribution:" header?

From:	ANU-NEWS@VM1.NoDak.EDU@SMTP@CRDGW2
To:	EVERHART@ARISIA@MRGATE

Received:  by crdgw1.ge.com (5.57/GE 1.99)
	 id AA11650; Sat, 8 Jun 91 12:17:53 EDT
Message-Id:  <9106081617.AA11650@crdgw1.ge.com>
Received: from NDSUVM1.BITNET by VM1.NoDak.EDU (IBM VM SMTP R1.2.1MX) with BSMTP id 8253; Sat, 08 Jun 91 11:16:55 CDT
Received: from NDSUVM1.BITNET by NDSUVM1.BITNET (Mailer R2.07) with BSMTP id
 5059; Sat, 08 Jun 91 11:16:54 CDT
Date:         Sat, 8 Jun 91 00:37:35 GMT
Reply-To: jeh%CMKRNL.UUCP@VM1.NoDak.EDU
Sender: ANU-NEWS Discussion <ANU-NEWS@VM1.NoDak.EDU>
From: jeh%CMKRNL.UUCP@VM1.NoDak.EDU
Subject:      Re: Misuse, confusion, re "Distribution:" header?
To: Multiple recipients of list ANU-NEWS <ANU-NEWS@ndsuvm1.GE.COM>

In article <1991Apr30.195041.1@sao.aarnet.edu.au>,
 gih900@sao.aarnet.edu.au writes:
> In article <1991Apr29.142220.2308@dcs.simpact.com>,
 jeh@dcs.simpact.com writes:
>> For news.software.anu-news readers:  ANU NEWS should probably be fixed so tha
t
>> if an item arrives with a "distribution" field that is acceptable according t
o
>> the systems file newsgroup filter (but not necessarily the distribution filte
r),
>> the item will be accepted.  [...]
>
> The change is a one-liner to test_accept():
>
> NEWSDIST.C
>
> [...]
> ************
> File $USERS:[GIH900.NEWS.NEWS_SRC]NEWSDIST.C;80
>   699                 /* some brain-dead news systems put the top level
>   700                    hierarchy in as the distribution keyword - so the
>   701                    newsgroup filter should also be matched against
>   702                    the distribution string */
>   703         if (!d && (d_sav != f_sav)) d = f_sav;
>   704         }
> ******
> File $USERS:[GIH900.NEWS.NEWS_SRC]NEWSDIST.C;78
>   695         }
> ************
>
> Geoff Huston

A bit more than one line is required.  I finally got around to trying this.
The first time I got a news item with a distribution header that was not
passed by my distribution filter, it sat in this while loop forever.
Reason:  The distribution: header passed by my newsgroup filter, either.
Line 703 once again set d to the head of the sys filter list and around and
around we went.

Replace line 703 above with

      if (!d && (d_sav != f_sav)) {
         d = f_sav;
         d_sav = f_sav;
         }

so that the next (second) time that d == 0, d_sav will == f_sav, so the test
will fail, so d will remain == 0, and we'll escape from the while (!d).

        --- Jamie Hanrahan, Kernel Mode Consulting, San Diego CA
Chair, VMS Internals Working Group, U.S. DECUS VAX Systems SIG
Internet:  jeh@dcs.simpact.com, hanrahan@eisner.decus.org, or jeh@crash.cts.com
Uucp:  ...{crash,scubed,decwrl}!simpact!cmkrnl!jeh
