From a770b74501a3faf6483c40735b70adae6fb95187 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 23 Apr 2014 12:39:01 -0400 Subject: Improvements to #11553 fix based on review Use a per-channel ratelim_t to control the rate at which we report failures for each channel. Explain why I picked N=32. Never return a zero circID. Thanks to Andrea and to cypherpunks. --- src/or/channel.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/or/channel.h') diff --git a/src/or/channel.h b/src/or/channel.h index e63c94961f..63da0c1c24 100644 --- a/src/or/channel.h +++ b/src/or/channel.h @@ -148,8 +148,6 @@ struct channel_s { ENUM_BF(circ_id_type_t) circ_id_type:2; /** DOCDOC*/ unsigned wide_circ_ids:1; - /** Have we logged a warning about circID exhaustion on this channel? */ - unsigned warned_circ_ids_exhausted:1; /* For how many circuits are we n_chan? What about p_chan? */ unsigned int num_n_circuits, num_p_circuits; @@ -178,6 +176,10 @@ struct channel_s { */ unsigned int is_local:1; + /** Have we logged a warning about circID exhaustion on this channel? + * If so, when? */ + ratelim_t last_warned_circ_ids_exhausted; + /** Channel timestamps for cell channels */ time_t timestamp_client; /* Client used this, according to relay.c */ time_t timestamp_drained; /* Output queue empty */ -- cgit v1.2.3-54-g00ecf