aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_edge.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-11-27 12:54:57 -0500
committerNick Mathewson <nickm@torproject.org>2015-11-27 12:54:57 -0500
commit0a701e537778ac9da31049f4efebf7cb2bf9c285 (patch)
tree3f6bdd2a09a7bca70acaf9059c6f10ddb6c69d01 /src/or/connection_edge.h
parenta33e9f208ae088fa3d63147fad9fc23654ca7ae1 (diff)
downloadtor-0a701e537778ac9da31049f4efebf7cb2bf9c285.tar.gz
tor-0a701e537778ac9da31049f4efebf7cb2bf9c285.zip
More fixes/debugging attempts for 17659
Diffstat (limited to 'src/or/connection_edge.h')
-rw-r--r--src/or/connection_edge.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/connection_edge.h b/src/or/connection_edge.h
index 90cf2a350f..6da51eb0c6 100644
--- a/src/or/connection_edge.h
+++ b/src/or/connection_edge.h
@@ -70,6 +70,14 @@ void connection_ap_mark_as_pending_circuit_(entry_connection_t *entry_conn,
const char *file, int line);
#define connection_ap_mark_as_pending_circuit(c) \
connection_ap_mark_as_pending_circuit_((c), __FILE__, __LINE__)
+void connection_ap_mark_as_non_pending_circuit(entry_connection_t *entry_conn);
+#define CONNECTION_AP_EXPECT_NONPENDING(c) do { \
+ if (ENTRY_TO_CONN(c)->state == AP_CONN_STATE_CIRCUIT_WAIT) { \
+ log_warn(LD_BUG, "At %s:%d: %p was unexpectedly in circuit_wait.", \
+ __FILE__, __LINE__, (c)); \
+ connection_ap_mark_as_non_pending_circuit(c); \
+ } \
+ } while (0)
void connection_ap_fail_onehop(const char *failed_digest,
cpath_build_state_t *build_state);
void circuit_discard_optional_exit_enclaves(extend_info_t *info);