ado@elsie.UUCP (Arthur David Olson) (09/26/84)
A while back I posted some changes to the "broadcast" function in 2.10.1's "ifuncs.c". They were designed to avoid having your system forward articles with headers including lines like Newsgroups: net.jokes Distribution: net to systems that didn't want "net.jokes" articles and were just throwing them out (generating diagnostic letters to you in the process). Now 2.10.2 news is with us. Its "postnews" puts "Distribution:" lines in ALL articles, a la: Newsgroups: net.news.b Distribution: net If you're passing news to a site that only wants some articles--one with a "/usr/lib/news/sys" line like: neighbor:net.unix,net.unix-wizards,net.news.b:U for example--and you've made the changes below, then 2.10.2 articles won't get forwarded. So...if you put in the changes, I'd recommend taking them out. You'll start getting those nasty computer-generated letters again-- at least until you convert to 2.10.2. -- broadcast() { register char *nptr, *hptr; register FILE *fp; #ifndef u370 struct srec srec; struct hbuf h; #endif /* h is a local copy of the header we can scribble on */ fp = xfopen(ARTICLE, "r"); if (hread(&h, fp, TRUE) == NULL) xerror("Cannot reread article"); fclose(fp); if (h.distribution[0]) > #ifdef OLDVERSION > strcpy(h.nbuf, h.distribution); > #else > ngcat(h.distribution); > #endif . . . while (*hptr != '\0') { if (strncmp(srec.s_name, hptr, SNLN) == 0) goto contin; while (*hptr++ != '\0') ; } > #ifndef OLDVERSION > if (h.distribution[0] && !ngmatch(h.distribution, srec.s_nbuf)) > continue; > #endif if (ngmatch(h.nbuf, srec.s_nbuf)) { transmit(&srec, xfopen(ARTICLE, "r"), 1); } -- UNIX is an AT&T Bell Laboratories trademark. -- ...decvax!seismo!umcp-cs!elsie!ado (301) 496-5688 DEC, VAX and Elsie are Digital Equipment Corp. and Borden's trademarks.