conn: Add an helper to mark a connection as waiting for an HS descriptor
commitd0682fe0f190ce55973d86ec92978aa6b3f61f1f
authorDavid Goulet <dgoulet@torproject.org>
Tue, 4 Dec 2018 19:00:08 +0000 (4 14:00 -0500)
committerDavid Goulet <dgoulet@torproject.org>
Tue, 4 Dec 2018 19:00:08 +0000 (4 14:00 -0500)
tree1f4173b3fde7a0664fa24f0cc3f95995a60df0e5
parent0906dde9d5ac409caf9f70ea7ec00efc42ec27ca
conn: Add an helper to mark a connection as waiting for an HS descriptor

The transition for a connection to either become or go back in
AP_CONN_STATE_RENDDESC_WAIT state must make sure that the entry connection is
_not_ in the waiting for circuit list.

This commit implements the helper function
connection_ap_mark_as_waiting_for_renddesc() that removes the entry connection
from the pending list and then change its state. This code pattern is used in
many places in the code where next commit will remove this code duplication to
use this new helper function.

Part of #28669

Signed-off-by: David Goulet <dgoulet@torproject.org>
src/core/or/connection_edge.c
src/core/or/connection_edge.h