diff options
author | Karsten Loesing <karsten.loesing@gmx.net> | 2009-07-05 19:53:25 +0200 |
---|---|---|
committer | Karsten Loesing <karsten.loesing@gmx.net> | 2009-07-05 19:53:25 +0200 |
commit | b493a2ccb97e00f4fe3acb5c59c941c2babaeebb (patch) | |
tree | eec79d7610ffc84657bfed515cfd948970377e39 /src/or/circuitlist.c | |
parent | 4d6af73db88e409764f43fc6cdaa432d667becf3 (diff) | |
download | tor-b493a2ccb97e00f4fe3acb5c59c941c2babaeebb.tar.gz tor-b493a2ccb97e00f4fe3acb5c59c941c2babaeebb.zip |
If configured, write cell statistics to disk periodically.
Diffstat (limited to 'src/or/circuitlist.c')
-rw-r--r-- | src/or/circuitlist.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c index 252eaf9f8e..5a20e7ebde 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); |