INN commit: trunk/nnrpd (list.c)
INN Commit
Russ_Allbery at isc.org
Sun Mar 23 17:59:00 UTC 2008
Date: Sunday, March 23, 2008 @ 10:59:00
Author: iulius
Revision: 7717
In response to a LIST [file] command, if the file does not exist,
we assume it is not maintained and return 503 instead of 215 and
an empty file.
Modified:
trunk/nnrpd/list.c
--------+
list.c | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
Modified: list.c
===================================================================
--- list.c 2008-03-22 22:11:41 UTC (rev 7716)
+++ list.c 2008-03-23 17:59:00 UTC (rev 7717)
@@ -231,20 +231,15 @@
qp = QIOopen(path);
free(path);
if (qp == NULL) {
+ Reply("%d No list of %s available.\r\n",
+ NNTP_ERR_UNAVAILABLE, lp->Items);
/* Only the active and overview.fmt files are required (but the last
- * one has already called cmd_list_schema). If the other files are not
- * available, we act as though they were empty. */
- if (!lp->Required && errno == ENOENT) {
- Reply("%d %s.\r\n", NNTP_OK_LIST, lp->Format);
- Printf(".\r\n");
- }
- else {
+ * one has already called cmd_list_schema). */
+ if (lp->Required || errno != ENOENT) {
/* %m outputs strerror(errno). */
- syslog(L_ERROR, "%s cant fopen %s %m", Client.host, lp->File);
- Reply("%d No list of %s available.\r\n",
- NNTP_ERR_UNAVAILABLE, lp->Items);
- }
- return;
+ syslog(L_ERROR, "%s cant fopen %s %m", Client.host, lp->File);
+ }
+ return;
}
Reply("%d %s.\r\n", NNTP_OK_LIST, lp->Format);
More information about the inn-committers
mailing list