INN commit: branches/2.5/innd (nc.c)

INN Commit rra at isc.org
Sun Nov 15 09:26:58 UTC 2009


    Date: Sunday, November 15, 2009 @ 01:26:57
  Author: iulius
Revision: 8787

In streaming mode, there is no code to defer an article sent via
TAKETHIS.  When the server was paused, we used 403 (temporary
failure).

However, RFC 4644 mentions that we MUST send 400 here and close
the connection so as not to reject the article.

Modified:
  branches/2.5/innd/nc.c

------+
 nc.c |   17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

Modified: nc.c
===================================================================
--- nc.c	2009-11-15 09:26:49 UTC (rev 8786)
+++ nc.c	2009-11-15 09:26:57 UTC (rev 8787)
@@ -218,13 +218,18 @@
     return;
   } else if (Mode == OMpaused) {
     cp->Reported++;
-    cp->State = CSgetcmd;
-    /* In streaming mode, there is no NNTP_FAIL_TAKETHIS_DEFER and we must
-     * not reject the article. */
-    if (cp->Sendid.size > 3)
-      snprintf(buff, sizeof(buff), "%d %s", NNTP_FAIL_ACTION, ModeReason);
-    else
+    if (cp->Sendid.size > 3) {
+      /* In streaming mode, there is no NNTP_FAIL_TAKETHIS_DEFER and RFC 4644
+       * mentions that we MUST send 400 here and close the connection so
+       * as not to reject the article.
+       * Yet, we could have sent NNTP_FAIL_ACTION without closing the
+       * connection... */
+      cp->State = CSwritegoodbye;
+      snprintf(buff, sizeof(buff), "%d %s", NNTP_FAIL_TERMINATING, ModeReason);
+    } else {
+      cp->State = CSgetcmd;
       snprintf(buff, sizeof(buff), "%d %s", NNTP_FAIL_IHAVE_DEFER, ModeReason);
+    }
     response = buff;
     NCwritereply(cp, response);
     return;




More information about the inn-committers mailing list