summaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorMike Perry <mikeperry-git@fscked.org>2012-08-15 19:59:55 -0700
committerMike Perry <mikeperry-git@fscked.org>2012-08-15 19:59:55 -0700
commitec6a7effb80af21484d83fd45d4e5eeb7c993dd4 (patch)
treefb95a7ab876451885c97d422864a935517b863e1 /src/or/or.h
parent91b52a259a271df7ceeea6d8bf7adbd4d7e15a6c (diff)
downloadtor-ec6a7effb80af21484d83fd45d4e5eeb7c993dd4.tar.gz
tor-ec6a7effb80af21484d83fd45d4e5eeb7c993dd4.zip
Bug 6475: Explicitly track our path bias state.
This is done to avoid spurious warns. Additional log lines are also added to try to track down the codepaths where we are somehow overcounting success counts.
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/or/or.h b/src/or/or.h
index 3a53e5ed86..0db6137e97 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -2596,6 +2596,12 @@ typedef struct circuit_t {
* circuit. */
#define MAX_RELAY_EARLY_CELLS_PER_CIRCUIT 8
+typedef enum {
+ PATH_STATE_NEW_CIRC = 0,
+ PATH_STATE_DID_FIRST_HOP = 1,
+ PATH_STATE_SUCCEEDED = 2,
+} path_state_t;
+
/** An origin_circuit_t holds data necessary to build and use a circuit.
*/
typedef struct origin_circuit_t {
@@ -2629,6 +2635,10 @@ typedef struct origin_circuit_t {
* cannibalized circuits. */
unsigned int has_opened : 1;
+ /** Kludge to help us prevent the warn in bug #6475 and eventually
+ * debug why we are not seeing first hops in some cases. */
+ path_state_t path_state;
+
/** Set iff this is a hidden-service circuit which has timed out
* according to our current circuit-build timeout, but which has
* been kept around because it might still succeed in connecting to