diff options
Diffstat (limited to 'src/or/command.c')
-rw-r--r-- | src/or/command.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/or/command.c b/src/or/command.c index 268c495371..8e214bf0a4 100644 --- a/src/or/command.c +++ b/src/or/command.c @@ -438,6 +438,7 @@ command_process_created_cell(cell_t *cell, channel_t *chan) static void command_process_relay_cell(cell_t *cell, channel_t *chan) { + const or_options_t *options = get_options(); circuit_t *circ; int reason, direction; @@ -511,6 +512,14 @@ command_process_relay_cell(cell_t *cell, channel_t *chan) direction==CELL_DIRECTION_OUT?"forward":"backward"); circuit_mark_for_close(circ, -reason); } + + /* If this is a cell in an RP circuit, count it as part of the + hidden service stats */ + if (options->HiddenServiceStatistics && + !CIRCUIT_IS_ORIGIN(circ) && + TO_OR_CIRCUIT(circ)->circuit_carries_hs_traffic_stats) { + rep_hist_seen_new_rp_cell(); + } } /** Process a 'destroy' <b>cell</b> that just arrived from |