INN commit: branches/2.4/nnrpd (list.c nnrpd.c)

INN Commit Russ_Allbery at isc.org
Sun Apr 6 08:40:30 UTC 2008


    Date: Sunday, April 6, 2008 @ 01:40:29
  Author: iulius
Revision: 7731

* 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.
* Typo in the answer for LIST MOTD (two final dots).
* Add capability to LIST ACTIVE.TIMES for a wildmat pattern
  as its third argument (LIST ACTIVE.TIMES *nntp).
* The "moderators" keyword was missing in the answer for HELP.

Modified:
  branches/2.4/nnrpd/list.c
  branches/2.4/nnrpd/nnrpd.c

---------+
 list.c  |   20 ++++++++------------
 nnrpd.c |    2 +-
 2 files changed, 9 insertions(+), 13 deletions(-)

Modified: list.c
===================================================================
--- list.c	2008-04-06 08:27:16 UTC (rev 7730)
+++ list.c	2008-04-06 08:40:29 UTC (rev 7731)
@@ -61,7 +61,7 @@
 };
 static LISTINFO		INFOmotd = {
     "motd", _PATH_MOTD, NULL, false, "motd",
-    "Message of the day text."
+    "Message of the day text"
 };
 
 static LISTINFO *info[] = {
@@ -179,7 +179,7 @@
             if (CMD_list_single(wildarg))
 		return;
 	}
-    } else if (lp == &INFOgroups) {
+    } else if (lp == &INFOgroups || lp == &INFOactivetimes) {
 	if (ac == 3)
 	    wildarg = av[2];
     }
@@ -204,16 +204,12 @@
     qp = QIOopen(path);
     free(path);
     if (qp == NULL) {
-	if (!lp->Required && errno == ENOENT) {
-	    Reply("%d %s.\r\n", NNTP_LIST_FOLLOWS_VAL, lp->Format);
-	    Printf(".\r\n");
-	}
-	else {
-	    syslog(L_ERROR, "%s cant fopen %s %m", ClientHost, lp->File);
-	    Reply("%d No list of %s available.\r\n",
-		NNTP_TEMPERR_VAL, lp->Items);
-	}
-	return;
+        Reply("%d No list of %s available.\r\n",
+              NNTP_TEMPERR_VAL, lp->Items);
+	    if (lp->Required || errno != ENOENT) {
+            syslog(L_ERROR, "%s cant fopen %s %m", ClientHost, lp->File);
+        }
+        return;
     }
 
     Reply("%d %s.\r\n", NNTP_LIST_FOLLOWS_VAL, lp->Format);

Modified: nnrpd.c
===================================================================
--- nnrpd.c	2008-04-06 08:27:16 UTC (rev 7730)
+++ nnrpd.c	2008-04-06 08:40:29 UTC (rev 7731)
@@ -130,7 +130,7 @@
     {	"last",		CMDnextlast,	true,	1,	1,
 	NULL },
     {	"list",		CMDlist,	true,	1,	3,
-	"[active|active.times|extensions|newsgroups|distributions|distrib.pats|overview.fmt|subscriptions|motd]" },
+	"[active|active.times|distrib.pats|distributions|extensions|moderators|motd|newsgroups|overview.fmt|subscriptions]" },
     {	"listgroup",	CMDgroup,	true,	1,	2,
 	"newsgroup" },
     {	"mode",		CMDmode,	false,	2,	2,



More information about the inn-committers mailing list