[news.software.b] Fix for locked active file while unbatching

rees@apollo.uucp (Jim Rees) (06/16/87)

I would like to recommend the following fix, in checkbatch(), ifuncs.c.
It's harmless on most machines, but on those machines that enforce
implicit locking (Apollo is the one I use, but I know there are others
as well) it's necessary.  The idea is to close the active file before
unpacking a batch, so it can be relocked for each individual article of
the batch.

***************
*** 1077,1082
  #define CPBFSZ 8192
  			char buf[CPBFSZ];
  
  			filename = 0;
  			do {
  				while (strncmp(cmd, "#! rnews ", 9)) {

--- 1077,1083 -----
  #define CPBFSZ 8192
  			char buf[CPBFSZ];
  
+ 			fclose(actfp);
  			filename = 0;
  			do {
  				while (strncmp(cmd, "#! rnews ", 9)) {