aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/connection_edge.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-01-11 18:53:24 -0500
committerNick Mathewson <nickm@torproject.org>2019-01-11 18:53:24 -0500
commitd21fa48cac0f41bd52306e269796559f75855323 (patch)
tree3f58bbe71874b15b205f47e7d7f7620388abbfbc /src/core/or/connection_edge.c
parent5dd926caa670002c6d2f15ac78e2282c00c352b6 (diff)
parentefd765a94816bb216e81a4962c94bac385947719 (diff)
downloadtor-d21fa48cac0f41bd52306e269796559f75855323.tar.gz
tor-d21fa48cac0f41bd52306e269796559f75855323.zip
Merge branch '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 33e4c6a4f4..93383a4e01 100644
--- a/src/core/or/connection_edge.c
+++ b/src/core/or/connection_edge.c
@@ -1368,6 +1368,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,