rick@seismo.UUCP (Rick Adams) (09/10/84)
There was a problem with sites getting a limited set of newsgroups and their interaction with the Distribution field. Also, some sites really want "local" groups passed between sites. The test for removal of local groups was changed so that if it was only posted to a local group (e.g. general) instead of a set of groups (e.g net.jobs,general) the local group was not removed. A diff -c of ifuncs.c follows. ---rick *** ifuncs.c.old Mon Sep 10 14:00:32 1984 --- ifuncs.c Mon Sep 10 14:00:35 1984 *************** *** 3,9 */ #ifndef lint ! static char *SccsId = "@(#)ifuncs.c 2.33 9/3/84"; #endif !lint #include "iparams.h" --- 3,9 ----- */ #ifndef lint ! static char *SccsId = "@(#)ifuncs.c 2.34 9/10/84"; #endif !lint #include "iparams.h" *************** *** 64,70 } if (ngmatch(h.nbuf, srec.s_nbuf)) { if (h.distribution[0] == '\0' || ! ngmatch(h.distribution, srec.s_nbuf)) { if (transmit(&srec, xfopen(ARTICLE, "r"), 1)) { if (nsent) strcat(sentbuf, ", "); --- 64,71 ----- } if (ngmatch(h.nbuf, srec.s_nbuf)) { if (h.distribution[0] == '\0' || ! ngmatch(h.distribution, srec.s_nbuf) || ! ngmatch(h.nbuf, h.distribution)) { if (transmit(&srec, xfopen(ARTICLE, "r"), 1)) { if (nsent) strcat(sentbuf, ", "); *************** *** 490,495 register char *s1, *s2; register FILE *f; register char *os1; char tbuf[BUFLEN], ngcheck[AFSIZ]; f = xfopen(ACTIVE, "r"); --- 491,497 ----- register char *s1, *s2; register FILE *f; register char *os1; + int ngroups = 1; char tbuf[BUFLEN], ngcheck[AFSIZ]; f = xfopen(ACTIVE, "r"); *************** *** 523,528 /* there shouldn't be blanks, but give the jerk a break */ if (*s1 == NGDELIM || *s1 == ' ') { *s2++ = '\0'; while (*++s1 == NGDELIM || *s1 == ' ') ; /* remove extra commas */ } else --- 525,531 ----- /* there shouldn't be blanks, but give the jerk a break */ if (*s1 == NGDELIM || *s1 == ' ') { *s2++ = '\0'; + ngroups++; while (*++s1 == NGDELIM || *s1 == ' ') ; /* remove extra commas */ } else *************** *** 584,590 /* check for local only distribution on incoming newsgroups. This might occur if someone posted to general,net.unix */ ! if(isproc && index(os1, '.') == NULL) { logerr("Local group '%s' removed", os1); tbufcpy(os1, s1); s1 = os1; --- 587,593 ----- /* check for local only distribution on incoming newsgroups. This might occur if someone posted to general,net.unix */ ! if(isproc && ngroups > 1 && index(os1, '.') == NULL) { logerr("Local group '%s' removed", os1); tbufcpy(os1, s1); s1 = os1;