aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitlist.c
diff options
context:
space:
mode:
authorKarsten Loesing <karsten.loesing@gmx.net>2009-07-05 19:53:25 +0200
committerKarsten Loesing <karsten.loesing@gmx.net>2009-07-05 19:53:25 +0200
commitb493a2ccb97e00f4fe3acb5c59c941c2babaeebb (patch)
treeeec79d7610ffc84657bfed515cfd948970377e39 /src/or/circuitlist.c
parent4d6af73db88e409764f43fc6cdaa432d667becf3 (diff)
downloadtor-b493a2ccb97e00f4fe3acb5c59c941c2babaeebb.tar
tor-b493a2ccb97e00f4fe3acb5c59c941c2babaeebb.tar.gz
If configured, write cell statistics to disk periodically.
Diffstat (limited to 'src/or/circuitlist.c')
-rw-r--r--src/or/circuitlist.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c
index 252eaf9f8..5a20e7ebd 100644
--- a/src/or/circuitlist.c
+++ b/src/or/circuitlist.c
@@ -447,6 +447,11 @@ circuit_free(circuit_t *circ)
rend_data_free(ocirc->rend_data);
} else {
or_circuit_t *ocirc = TO_OR_CIRCUIT(circ);
+#ifdef ENABLE_BUFFER_STATS
+ /* Remember cell statistics for this circuit before deallocating. */
+ if (get_options()->CellStatistics)
+ add_circ_to_buffer_stats(circ, time(NULL));
+#endif
mem = ocirc;
memlen = sizeof(or_circuit_t);
tor_assert(circ->magic == OR_CIRCUIT_MAGIC);