K 10
svn:author
V 5
alexk
K 8
svn:date
V 27
2002-10-22T09:29:24.000000Z
K 7
svn:log
V 861
Fix from Miquel van Smoorenburg <miquels@cistron.nl>:

On one of our servers multiple rnews -U processes were running at
the same time, and because rnews doesn't lock the batch it's
processing this resulted in the same posting getting submitted
to innd multiple times. Innd rejected the duplicates, and they
ended up in the bad/ directory filling up the disk.

So I fixed that by making rnews lock the batch using inn_lock_file.
While editting rnews.c I fixed a few other bugs as well:

- in main(), if UnpackOne() fails, Spool() is called but we
  have to rewind the fd first
- ReadRemainder() closes the file when its done - it should
  leave that to the caller
- Unspool() sets UUCPHost unconditionally, it should only
  do that for batches that have a host in their name
- In fact, the remote hostname is never encoded in the batch
  file when spooling it.

END
