X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=innduct.git;a=blobdiff_plain;f=recv.c;h=b163f9cf747a29570d104411a8987368939ce3b4;hp=5204dced0e7cca479f17900f712c73092be0957b;hb=e2d02662c513ccf5ed9391483cec014a12db087d;hpb=f040b1fe921a666514b59f0374817832e11bca2d diff --git a/recv.c b/recv.c index 5204dce..b163f9c 100644 --- a/recv.c +++ b/recv.c @@ -117,10 +117,13 @@ static void update_nocheck(int accepted) { void article_done(Article *art, int whichcount) { if (whichcount>=0 && !art->missing) - art->ipf->counts.counts[art->state][whichcount]++; + 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; @@ -185,8 +188,9 @@ void *peer_rd_ok(oop_source *lp, oop_read *oread, oop_rd_event ev, conn->quitting, sani); } else { LIST_REMOVE(conns,conn); - notice("C%d (now %d) idle connection closed (%s)", + info("C%d (now %d) idle connection closed (%s)", conn->fd, conns.count, conn->quitting); + notice_conns_fewer(); assert(!busy); conn_dispose(conn); } @@ -223,8 +227,9 @@ void *peer_rd_ok(oop_source *lp, oop_read *oread, oop_rd_event ev, PEERBADMSG("peer timed us out or stopped accepting articles"); LIST_REMOVE(conns,conn); - notice("C%d (now %d) idle connection closed by peer", - conns.count, conn->fd); + info("C%d (now %d) idle connection closed by peer", + conns.count, conn->fd); + notice_conns_fewer(); conn_dispose(conn); return OOP_CONTINUE; @@ -242,7 +247,7 @@ void *peer_rd_ok(oop_source *lp, oop_read *oread, oop_rd_event ev, case 335: /* IHAVE says send it */ GET_ARTICLE(-1); assert(art->state == art_Unchecked); - art->ipf->counts.counts[art->state][RC_accepted]++; + art->ipf->counts.results[art->state][RC_accepted]++; art->state= art_Wanted; LIST_ADDTAIL(conn->priority, art); break;