From 250ae75a877201da19838ed832077cedbca4995b Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Tue, 6 Sep 2005 18:52:34 +0000 Subject: [PATCH] Cleanup news post queue even after some messages are refused --- ChangeLog | 4 ++++ TODO | 4 ---- mbfido/newspost.c | 8 +++++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index a74be12c..678a32d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,10 @@ v0.71.6 02-Sep-2005 mbcico: Changed compression state logic. + mbfido: + If some newsarticles are not accepted for post, don't treat + this as fatal and clear the sendqueue. + v0.71.5 18-Aug-2005 - 02-Sep-2005 diff --git a/TODO b/TODO index d5f6c3f2..217d154e 100644 --- a/TODO +++ b/TODO @@ -92,10 +92,6 @@ mbfido: N: Someday make retoss from bad possible (volonteers?). - N: When posting news better check which articles are posted ok, and - what are fatal errors from the newsserver to prevent repost of good - posts. - mbcico: L: Implement binkp option ND. diff --git a/mbfido/newspost.c b/mbfido/newspost.c index 8c2d22f3..5d64578d 100644 --- a/mbfido/newspost.c +++ b/mbfido/newspost.c @@ -43,7 +43,7 @@ extern int news_bad; int newspost(void) { - int start = TRUE; + int start = TRUE, fatal = FALSE; char *buf, *p; long curpos, count, seqnr; FILE *ofp = NULL, *nb; @@ -219,9 +219,11 @@ int newspost(void) unlink(buf); } - if (! news_bad) { - snprintf(buf, 10240, "%s/tmp/newsout", getenv("MBSE_ROOT")); + snprintf(buf, 10240, "%s/tmp/newsout", getenv("MBSE_ROOT")); + if (! fatal) { unlink(buf); + } else { + Syslog('+', "Fatal errors posting news, %s not removed", buf); } free(buf);