Xref: utzoo news.software.b:3469 comp.sources.bugs:2054 Path: utzoo!utstat!jarvis.csri.toronto.edu!mailrus!shadooby!samsung!uunet!ateng!chip From: chip@ateng.com (Chip Salzenberg) Newsgroups: news.software.b,comp.sources.bugs Subject: C News fix for unstalled batching Message-ID: <25605C32.28948@ateng.com> Date: 14 Nov 89 18:40:48 GMT Organization: A T Engineering, Tampa, FL Lines: 46 One of the sites that we feed hasn't been keeping up with their batches. In fact, they've fallen so far behind that entire batches that should be 100K are empty because all the articles in them have expired. Unfortunately, the C News sendbatches program doesn't notice when an outgoing batch is empty. It sends it anyway. Therefore, today the outgoing queue to this problem site was full of 20 empty batches. The fullness of the outgoing queue prevented the enqueuing of any non-empty batches. This patch should fix that bug. It notices the size of an outgoing batch, and if the batch is empty, it doesn't send it. *** sendbatches.P Tue Sep 19 14:36:45 1989 --- sendbatches Tue Nov 14 13:28:48 1989 *************** *** 144,152 **** for f in $them do ! ( $batcher -d $NEWSARTS $f | $muncher | ! $sender $sys ) >/tmp/nb$$ 2>&1 if test $? -eq 0 -a ! -s /tmp/nb$$ then ! rm -f $f /tmp/nb$$ else ( --- 144,157 ---- for f in $them do ! $batcher -d $NEWSARTS $f >/tmp/b$$ ! if test ! -s /tmp/b$$ ! then ! rm -f $f /tmp/b$$ ! continue ! fi ! ( $muncher | $sender $sys ) /tmp/nb$$ 2>&1 if test $? -eq 0 -a ! -s /tmp/nb$$ then ! rm -f $f /tmp/b$$ /tmp/nb$$ else ( I hope this patch will meet with the approval of the C News Cabal -- er, authors. (Hey, yeah! "C" stands for Cabal! That's the ticket!) -- You may redistribute this article only to those who may freely do likewise. Chip Salzenberg at A T Engineering; or