chiark
/
gitweb
/
~ian
/
innduct.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
improve logging
[innduct.git]
/
recv.c
diff --git
a/recv.c
b/recv.c
index dbeb4b68bb47b3815ba8b25ecc56e41d462e8657..00ec7bc22adb4644846466e04d413bc8d0b4f785 100644
(file)
--- a/
recv.c
+++ b/
recv.c
@@
-117,7
+117,7
@@
static void update_nocheck(int accepted) {
void article_done(Article *art, int whichcount) {
if (whichcount>=0 && !art->missing)
void article_done(Article *art, int whichcount) {
if (whichcount>=0 && !art->missing)
- art->ipf->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) update_nocheck(0);
@@
-185,8
+185,9
@@
void *peer_rd_ok(oop_source *lp, oop_read *oread, oop_rd_event ev,
conn->quitting, sani);
} else {
LIST_REMOVE(conns,conn);
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);
conn->fd, conns.count, conn->quitting);
+ notice_conns_fewer();
assert(!busy);
conn_dispose(conn);
}
assert(!busy);
conn_dispose(conn);
}
@@
-223,8
+224,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);
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;
conn_dispose(conn);
return OOP_CONTINUE;
@@
-242,7
+244,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);
case 335: /* IHAVE says send it */
GET_ARTICLE(-1);
assert(art->state == art_Unchecked);
- art->ipf->counts[art->state][RC_accepted]++;
+ art->ipf->counts
.results
[art->state][RC_accepted]++;
art->state= art_Wanted;
LIST_ADDTAIL(conn->priority, art);
break;
art->state= art_Wanted;
LIST_ADDTAIL(conn->priority, art);
break;