sid@llama.rtech.UUCP (Sid Shapiro) (08/04/87)
References: It has recently been brought to my attention that with our version of rrn (the one that came on the 4.3 tapes) that a user couldn't followup to some groups. By experimentation I discovered that you(we) cannot followup to any newsgroups for which we have a killfile?!? Before I go digging, has anyone else noticed this or can verify that this is or is not the case? Thanks, -- Sid Shapiro -- Relational Technology, Inc {mtxinu,cpsc6a}!rtech!sid (415)748-3470
sid@llama.rtech.UUCP (Sid Shapiro) (08/19/87)
In article <1110@rtech.UUCP> I wrote: >It has recently been brought to my attention that with our version of >rrn (the one that came on the 4.3 tapes) that a user couldn't followup >to some groups. By experimentation I discovered that you(we) cannot >followup to any newsgroups for which we have a killfile?!? > >Before I go digging, has anyone else noticed this or can verify that >this is or is not the case? >Thanks, Well I dug and I found - I don't necessarily understand, but I fixed it. In ng.c, if there is a kill file, it is opened. It is not closed until later. However if you close it when you are done with it, all goes well. Weird. In checking, though, I found another error in the code. In kfile.c we do a stat on the kill file. Then go ahead and check the size of the file, well if the file doesn't exist to stat, we go ahead and check the size anyway - we should check to see that stat returned something meaningful. The diffs for the two fixes follow: (did no one else really have this problem?) RCS file: RCS/kfile.c,v retrieving revision 1.1 retrieving revision 1.2 diff -c -r1.1 -r1.2 *** /tmp/,RCSt1001162 Wed Aug 19 07:33:25 1987 --- /tmp/,RCSt2001162 Wed Aug 19 07:33:26 1987 *************** *** 240,258 getval("KILLGLOBAL",killglobal) ); ! stat(kname,&filestat); ! if (!filestat.st_size) /* nothing in the file? */ ! UNLINK(kname); /* delete the file */ ! if (local) { ! if (localkfp) ! fclose(localkfp); ! localkfp = fopen(kname,"r"); ! } ! else { ! if (globkfp) ! fclose(globkfp); ! globkfp = fopen(kname,"r"); ! } } void --- 239,259 ----- getval("KILLGLOBAL",killglobal) ); ! if (stat(kname,&filestat) == 0) { ! if (!filestat.st_size) /* nothing in the file? */ ! UNLINK(kname); /* delete the file */ ! if (local) { ! if (localkfp) ! fclose(localkfp); ! localkfp = fopen(kname,"r"); ! } ! else { ! if (globkfp) ! fclose(globkfp); ! globkfp = fopen(kname,"r"); ! } ! } } void RCS file: RCS/ng.c,v retrieving revision 1.1 retrieving revision 1.2 diff -c -r1.1 -r1.2 *** /tmp/,RCSt1001174 Wed Aug 19 07:33:38 1987 --- /tmp/,RCSt2001174 Wed Aug 19 07:33:39 1987 *************** *** 215,220 #ifdef TERSE kill_unwanted(firstart,"Killing...\n\n",TRUE); #endif #endif /* do they want a special top line? */ --- 215,232 ----- #ifdef TERSE kill_unwanted(firstart,"Killing...\n\n",TRUE); #endif + #endif + #ifdef KILLFILES + if (localkfp) { + #ifdef VERBOSE + IF(verbose) + printf("\nClosing killfiles...\n") FLUSH; + ELSE + #endif + ; + fclose(localkfp); + localkfp = Nullfp; + } #endif /* do they want a special top line? */