INN commit: trunk/innd (art.c)
INN Commit
Russ_Allbery at isc.org
Fri Apr 3 19:35:29 UTC 2009
Date: Friday, April 3, 2009 @ 12:35:29
Author: iulius
Revision: 8399
* Make the code more robust as for the use of the distributions
list (make sure it is not null).
* Fix a bug in the remembering of message-IDs (remembertrash
was not checked when an error occurs during storing).
Modified:
trunk/innd/art.c
-------+
art.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
Modified: art.c
===================================================================
--- art.c 2009-04-03 19:12:22 UTC (rev 8398)
+++ art.c 2009-04-03 19:35:29 UTC (rev 8399)
@@ -2113,8 +2113,9 @@
} else {
ARTparsedist(HDR(HDR__DISTRIBUTION), HDR_LEN(HDR__DISTRIBUTION),
&data->Distribution);
- if (ME.Distributions &&
- !DISTwantany(ME.Distributions, data->Distribution.List)) {
+ if (ME.Distributions && data->Distribution.List != NULL
+ && *data->Distribution.List != NULL
+ && !DISTwantany(ME.Distributions, data->Distribution.List)) {
snprintf(cp->Error, sizeof(cp->Error),
"%d Unwanted distribution \"%s\"",
ihave ? NNTP_FAIL_IHAVE_REJECT : NNTP_FAIL_TAKETHIS_REJECT,
@@ -2433,7 +2434,8 @@
snprintf(cp->Error, sizeof(cp->Error), "%d cant store article",
ihave ? NNTP_FAIL_IHAVE_DEFER : NNTP_FAIL_ACTION);
ARTlog(data, ART_REJECT, cp->Error);
- if ((Mode == OMrunning) && !InndHisRemember(HDR(HDR__MESSAGE_ID)))
+ if (innconf->remembertrash && (Mode == OMrunning)
+ && !InndHisRemember(HDR(HDR__MESSAGE_ID)))
syslog(L_ERROR, "%s cant write history %s %m", LogName,
HDR(HDR__MESSAGE_ID));
ARTreject(REJECT_OTHER, cp);
More information about the inn-committers
mailing list