From 1dfe5703bf1ce42c78050fb59cd57c0d00ea16eb Mon Sep 17 00:00:00 2001 From: Karsten Loesing Date: Wed, 10 Dec 2014 11:15:44 +0100 Subject: [PATCH] CLASSIFIED! Log statements and XXX comments. --- src/or/command.c | 2 ++ src/or/rendmid.c | 1 + src/or/rephist.c | 8 ++++++++ 3 files changed, 11 insertions(+) diff --git a/src/or/command.c b/src/or/command.c index 8e214bf..a212cbf 100644 --- a/src/or/command.c +++ b/src/or/command.c @@ -518,6 +518,8 @@ command_process_relay_cell(cell_t *cell, channel_t *chan) if (options->HiddenServiceStatistics && !CIRCUIT_IS_ORIGIN(circ) && TO_OR_CIRCUIT(circ)->circuit_carries_hs_traffic_stats) { + log_warn(LD_GENERAL, "Saw new RP cell in %u.", + TO_OR_CIRCUIT(circ)->p_circ_id); rep_hist_seen_new_rp_cell(); } } diff --git a/src/or/rendmid.c b/src/or/rendmid.c index 1c56471..e7169a3 100644 --- a/src/or/rendmid.c +++ b/src/or/rendmid.c @@ -320,6 +320,7 @@ rend_mid_rendezvous(or_circuit_t *circ, const uint8_t *request, /* Statistics: Mark this circuit as an RP circuit so that we collect stats from it. */ if (options->HiddenServiceStatistics) { + log_warn(LD_GENERAL, "New RP circuit %u.", (unsigned)circ->p_circ_id); circ->circuit_carries_hs_traffic_stats = 1; } diff --git a/src/or/rephist.c b/src/or/rephist.c index b1a0513..96485b2 100644 --- a/src/or/rephist.c +++ b/src/or/rephist.c @@ -3023,6 +3023,14 @@ rep_hist_seen_maybe_new_hs(const crypto_pk_t *pubkey) pubkey_hash)) { digestmap_set(hs_stats->onions_seen_this_period, pubkey_hash, (void*)(uintptr_t)1); + + log_warn(LD_GENERAL, "Saw new HS %s (now %d)", + hex_str(pubkey_hash, DIGEST_LEN), + digestmap_size(hs_stats->onions_seen_this_period)); + } else { + log_warn(LD_GENERAL, "Not double counting %s (still %d)", + hex_str(pubkey_hash, DIGEST_LEN), + digestmap_size(hs_stats->onions_seen_this_period)); } } -- 1.9.3 (Apple Git-50)