From 27ba618c5e44c479a05b2c395049dde71488e84a Mon Sep 17 00:00:00 2001 From: Richard Nyberg Date: Mon, 4 Jul 2005 15:41:31 +0000 Subject: Move increment of btpd.npeers to a more fitting location. --- btpd/net.c | 2 -- btpd/peer.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/btpd/net.c b/btpd/net.c index 4e15ae3..903b4df 100644 --- a/btpd/net.c +++ b/btpd/net.c @@ -933,7 +933,6 @@ net_connect2(struct sockaddr *sa, socklen_t salen, int *sd) return errno; } - btpd.npeers++; return 0; } @@ -983,7 +982,6 @@ net_connection_cb(int sd, short type, void *arg) return; } - btpd.npeers++; peer_create_in(nsd); btpd_log(BTPD_L_CONN, "got connection.\n"); diff --git a/btpd/peer.c b/btpd/peer.c index 1ab125f..2843b75 100644 --- a/btpd/peer.c +++ b/btpd/peer.c @@ -151,6 +151,7 @@ peer_create_common(int sd) event_set(&p->in_ev, p->sd, EV_READ, net_read_cb, p); event_add(&p->in_ev, NULL); + btpd.npeers++; return p; } -- cgit 1.4.1