aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/connection_edge.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-01-11 18:53:18 -0500
committerNick Mathewson <nickm@torproject.org>2019-01-11 18:53:18 -0500
commitefd765a94816bb216e81a4962c94bac385947719 (patch)
tree729bccd24fa912992a813edd6b79fd5eb413593e /src/core/or/connection_edge.c
parent694e3c57fd1af2cdaa4650d69c50f4108a8612f6 (diff)
parentcec616a0c8ff060cb722e54342fd30aeab3ad285 (diff)
downloadtor-efd765a94816bb216e81a4962c94bac385947719.tar.gz
tor-efd765a94816bb216e81a4962c94bac385947719.zip
Merge remote-tracking branch 'tor-github/pr/563' into maint-0.3.5
Diffstat (limited to 'src/core/or/connection_edge.c')
-rw-r--r--src/core/or/connection_edge.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/or/connection_edge.c b/src/core/or/connection_edge.c
index 2ec83c1204..57cb1194cf 100644
--- a/src/core/or/connection_edge.c
+++ b/src/core/or/connection_edge.c
@@ -1357,6 +1357,21 @@ connection_ap_mark_as_non_pending_circuit(entry_connection_t *entry_conn)
smartlist_remove(pending_entry_connections, entry_conn);
}
+/** Mark <b>entry_conn</b> as waiting for a rendezvous descriptor. This
+ * function will remove the entry connection from the waiting for a circuit
+ * list (pending_entry_connections).
+ *
+ * This pattern is used across the code base because a connection in state
+ * AP_CONN_STATE_RENDDESC_WAIT must not be in the pending list. */
+void
+connection_ap_mark_as_waiting_for_renddesc(entry_connection_t *entry_conn)
+{
+ tor_assert(entry_conn);
+
+ connection_ap_mark_as_non_pending_circuit(entry_conn);
+ ENTRY_TO_CONN(entry_conn)->state = AP_CONN_STATE_RENDDESC_WAIT;
+}
+
/* DOCDOC */
void
connection_ap_warn_and_unmark_if_pending_circ(entry_connection_t *entry_conn,