chiark / gitweb /
Count rejections of nochecked articles against nocheck threshold
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sat, 19 Jun 2010 17:01:58 +0000 (18:01 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sat, 19 Jun 2010 17:01:58 +0000 (18:01 +0100)
README.statistics
innduct.h
recv.c

index 6c9b9316534f8f2c9bd8d3f4eec0433066e2971f..794a33dc29b740872a23e1bb156a7ad8161bdc0e 100644 (file)
@@ -1,6 +1,6 @@
                        START
                        =====
-                         |                               
+                         |
       ,------------------>|<-----------------------------------------------.
       |                          |                                                |
       |                    < article has been deferred already >                  |
       |conn                      |                    END                         |
       |fails;       < nocheck mode >                                      |
       |requeued      yes         no                                       |
-      |.id/bod/nc   /                    |  CHECK                                 |
+      |.id/bod/nc   /                    |CHECK/IHAVE                             |
       |++          |             |offered.ch++                            |
       |            |             |                                        |
-      |            |             |                                        |
+      |            |             |                                        |
    ^^^^^^^^        |             |                                        |
-     at            |                     |                                        |
-     any           |             |                                        |
+     at            |                     |                                        |
+     any           |             |                                        |
      time          |          ______ < peer response > _________          |
                    |      wanted   unwanted   rejected   deferred         |
+                   |              238/338  438/435     439*      436/431          |
                    |                /        |          |           |             |
                    |<-------'                |unwanted  |rejected   |deferred     |
                    |                 | .id++    | .id++     | .id++       |
            < article exists >         |                 |           |             |
             no        yes           ===        ===          `-----------> |
-            |          |            END        END                        |
-             |                 | TAKETHIS                                         |
-            |          |sent.ch/.nc++                                     |
-            |          |                                                  |
-            |          `-------.                                          |
-            |                  |                                          |
+            |          |            END        END                        |
+             |                 |                                                  |
+            |          |TAKETHIS/body                                     |
+            |          |sent.ch/.nc++                                     |
+            |          `-------.                                          |
+            |                  |                                          |
                     |                ______ < peer response > _________           |
-            |           accepted   unwanted   rejected   deferred         |         
+            |           accepted   unwanted   rejected   deferred         |
+                    |           239/235    438*/435*   439/437    436/431*        |
                     |              |           |           |           |          |
             |missing       |accepted   |unwanted   |rejected   |deferred  |
             |.bod/nc++     |.bod/nc++  |.bod/nc++  |.bod/nc++  |.bod/nc++ |
             |              |           |           |           |          |
            ===            ===         ===         ===          `----------'
            END            END         END         END
+
+Response codes are <code from CHECK/TAKETHIS>/<code from IHAVE>
+* indicates response which is forbidden in this context by RFC4644/3977
+
index 273fb5ec7758df00f196a34dfe8580621b45c5c4..5a337cde6b5b55b8f3010c32dba444de1a8c35e6 100644 (file)
--- a/innduct.h
+++ b/innduct.h
@@ -186,7 +186,7 @@ extern double max_bad_data_ratio;
 extern int max_bad_data_initial;
 
 
-/*----- statistics -----*/
+/*----- article states, and statistics -----*/
 
 typedef enum {      /* in queue                 in conn->sent             */
   art_Unchecked,    /*   not checked, not sent    checking                */
diff --git a/recv.c b/recv.c
index 00ec7bc22adb4644846466e04d413bc8d0b4f785..b163f9cf747a29570d104411a8987368939ce3b4 100644 (file)
--- a/recv.c
+++ b/recv.c
@@ -119,8 +119,11 @@ void article_done(Article *art, int whichcount) {
   if (whichcount>=0 && !art->missing)
     art->ipf->counts.results[art->state][whichcount]++;
 
-  if (whichcount == RC_accepted) update_nocheck(1);
-  else if (whichcount == RC_unwanted) update_nocheck(0);
+  if (whichcount == RC_accepted)
+    update_nocheck(1);
+  else if (whichcount == RC_unwanted ||
+          (whichcount == RC_rejected && art->state == art_Unsolicited))
+    update_nocheck(0);
 
   InputFile *ipf= art->ipf;