diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-02-24 13:25:56 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-02-24 13:26:38 +0100 |
commit | 0f67fd7bc65b07feceff790fb18e7e8a0aaeac69 (patch) | |
tree | 50ef7b55ac0cc03b6bfc8dac5978328db2729db1 /src/cadet | |
parent | e86eed18860a354d1b224503a8f51c06c615e79d (diff) | |
download | gnunet-0f67fd7bc65b07feceff790fb18e7e8a0aaeac69.tar.gz gnunet-0f67fd7bc65b07feceff790fb18e7e8a0aaeac69.zip |
update counters properly
Diffstat (limited to 'src/cadet')
-rw-r--r-- | src/cadet/gnunet-service-cadet-new_tunnels.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cadet/gnunet-service-cadet-new_tunnels.c b/src/cadet/gnunet-service-cadet-new_tunnels.c index af77ea067..05a1e071d 100644 --- a/src/cadet/gnunet-service-cadet-new_tunnels.c +++ b/src/cadet/gnunet-service-cadet-new_tunnels.c | |||
@@ -603,6 +603,7 @@ GCT_count_any_connections (const struct CadetTunnel *t) | |||
603 | static struct CadetTConnection * | 603 | static struct CadetTConnection * |
604 | get_ready_connection (struct CadetTunnel *t) | 604 | get_ready_connection (struct CadetTunnel *t) |
605 | { | 605 | { |
606 | GNUNET_assert (GNUNET_YES == t->connection_ready_head->is_ready); | ||
606 | return t->connection_ready_head; | 607 | return t->connection_ready_head; |
607 | } | 608 | } |
608 | 609 | ||
@@ -1971,13 +1972,19 @@ GCT_connection_lost (struct CadetTConnection *ct) | |||
1971 | struct CadetTunnel *t = ct->t; | 1972 | struct CadetTunnel *t = ct->t; |
1972 | 1973 | ||
1973 | if (GNUNET_YES == ct->is_ready) | 1974 | if (GNUNET_YES == ct->is_ready) |
1975 | { | ||
1974 | GNUNET_CONTAINER_DLL_remove (t->connection_ready_head, | 1976 | GNUNET_CONTAINER_DLL_remove (t->connection_ready_head, |
1975 | t->connection_ready_tail, | 1977 | t->connection_ready_tail, |
1976 | ct); | 1978 | ct); |
1979 | t->num_ready_connections--; | ||
1980 | } | ||
1977 | else | 1981 | else |
1982 | { | ||
1978 | GNUNET_CONTAINER_DLL_remove (t->connection_busy_head, | 1983 | GNUNET_CONTAINER_DLL_remove (t->connection_busy_head, |
1979 | t->connection_busy_tail, | 1984 | t->connection_busy_tail, |
1980 | ct); | 1985 | ct); |
1986 | t->num_busy_connections--; | ||
1987 | } | ||
1981 | GNUNET_free (ct); | 1988 | GNUNET_free (ct); |
1982 | } | 1989 | } |
1983 | 1990 | ||