Cleanup news post queue even after some messages are refused

This commit is contained in:
Michiel Broek
2005-09-06 18:52:34 +00:00
parent 5055afc9d3
commit 250ae75a87
3 changed files with 9 additions and 7 deletions

View File

@@ -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);