INN commit: trunk/nnrpd (commands.c nnrpd.c)

INN Commit Russ_Allbery at isc.org
Sun Aug 24 07:36:22 UTC 2008


    Date: Sunday, August 24, 2008 @ 00:36:22
  Author: iulius
Revision: 7958

Revert changes of revision 7956.
MODE is a base command in RFC 3977 so 501 is the right code
to return after MODE, MODE FOO and MODE FOO BAR.

Modified:
  trunk/nnrpd/commands.c
  trunk/nnrpd/nnrpd.c

------------+
 commands.c |    2 +-
 nnrpd.c    |    9 +--------
 2 files changed, 2 insertions(+), 9 deletions(-)

Modified: commands.c
===================================================================
--- commands.c	2008-08-23 20:50:57 UTC (rev 7957)
+++ commands.c	2008-08-24 07:36:22 UTC (rev 7958)
@@ -309,7 +309,7 @@
                PERMaccessconf->pathhost, INN_VERSION_STRING,
 	       PERMcanpost ? "posting ok" : "no posting");
     else
-	Reply("%d What?\r\n", NNTP_ERR_COMMAND);
+	Reply("%d What?\r\n", NNTP_ERR_SYNTAX);
 }
 
 static int GroupCompare(const void *a1, const void* b1) {

Modified: nnrpd.c
===================================================================
--- nnrpd.c	2008-08-23 20:50:57 UTC (rev 7957)
+++ nnrpd.c	2008-08-24 07:36:22 UTC (rev 7958)
@@ -1134,14 +1134,7 @@
 	for (cp = CMDtable; cp->Name; cp++)
 	    if (strcasecmp(cp->Name, av[0]) == 0)
 		break;
-
-        /* If no command is recognized or if "mode" is received.
-         * We have to handle the special "mode" command here owing to its not being
-         * a base name:  "mode reader" is the only one currently recognized.
-         * "mode something extra-arg" must not be matched further. */
-	if ( (cp->Name == NULL)
-          || ( (strcasecmp(av[0], "mode") == 0)
-            && ((ac < 2) || (strcasecmp(av[1], "reader") != 0)) ) ) {
+	if (cp->Name == NULL) {
 	    if ((int)strlen(buff) > 40)
 		syslog(L_NOTICE, "%s unrecognized %.40s...", Client.host, buff);
 	    else



More information about the inn-committers mailing list