aboutsummaryrefslogtreecommitdiff
path: root/src/or/channel.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-04-23 12:39:01 -0400
committerNick Mathewson <nickm@torproject.org>2014-04-23 12:39:01 -0400
commita770b74501a3faf6483c40735b70adae6fb95187 (patch)
tree0fcb8430ca965cef50a0b3b1ebaab648d0fefe69 /src/or/channel.h
parent985deaaaf7b7397857e02206e89392e0ee101077 (diff)
downloadtor-a770b74501a3faf6483c40735b70adae6fb95187.tar
tor-a770b74501a3faf6483c40735b70adae6fb95187.tar.gz
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.
Diffstat (limited to 'src/or/channel.h')
-rw-r--r--src/or/channel.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/channel.h b/src/or/channel.h
index e63c94961..63da0c1c2 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 */