From: Ian Jackson Date: Sat, 19 Jun 2010 17:01:58 +0000 (+0100) Subject: Count rejections of nochecked articles against nocheck threshold X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=innduct.git;a=commitdiff_plain;h=cb8a14892f10d346b83f7f4668978b9f89f717fc Count rejections of nochecked articles against nocheck threshold --- diff --git a/README.statistics b/README.statistics index 6c9b931..794a33d 100644 --- a/README.statistics +++ b/README.statistics @@ -1,6 +1,6 @@ START ===== - | + | ,------------------>|<-----------------------------------------------. | | | | < article has been deferred already > | @@ -15,31 +15,37 @@ |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 / +* indicates response which is forbidden in this context by RFC4644/3977 + diff --git a/innduct.h b/innduct.h index 273fb5e..5a337cd 100644 --- 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 00ec7bc..b163f9c 100644 --- 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;