diff options
author | David Goulet <dgoulet@torproject.org> | 2018-12-04 14:09:15 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2018-12-04 14:10:00 -0500 |
commit | 00b59d92817f34c60fe9bc1f8b72b6e81ae1c431 (patch) | |
tree | 61faf25a34f33ad3a6959657675f267dae78ed08 /src/feature | |
parent | d0682fe0f190ce55973d86ec92978aa6b3f61f1f (diff) | |
download | tor-00b59d92817f34c60fe9bc1f8b72b6e81ae1c431.tar.gz tor-00b59d92817f34c60fe9bc1f8b72b6e81ae1c431.zip |
conn: Use connection_ap_mark_as_waiting_for_renddesc()
Use the helper function connection_ap_mark_as_waiting_for_renddesc()
introduced in previous commit everywhere in the code where an AP connection
state is transitionned to AP_CONN_STATE_RENDDESC_WAIT.
Part of #28669
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature')
-rw-r--r-- | src/feature/hs/hs_client.c | 3 | ||||
-rw-r--r-- | src/feature/rend/rendclient.c | 6 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/feature/hs/hs_client.c b/src/feature/hs/hs_client.c index dfad216abb..43e5b80e52 100644 --- a/src/feature/hs/hs_client.c +++ b/src/feature/hs/hs_client.c @@ -142,8 +142,7 @@ flag_all_conn_wait_desc(const ed25519_public_key_t *service_identity_pk) if (edge_conn->hs_ident && ed25519_pubkey_eq(&edge_conn->hs_ident->identity_pk, service_identity_pk)) { - connection_ap_mark_as_non_pending_circuit(TO_ENTRY_CONN(conn)); - conn->state = AP_CONN_STATE_RENDDESC_WAIT; + connection_ap_mark_as_waiting_for_renddesc(TO_ENTRY_CONN(conn)); } } SMARTLIST_FOREACH_END(conn); diff --git a/src/feature/rend/rendclient.c b/src/feature/rend/rendclient.c index 10b67ceda9..6ecb3eb3c6 100644 --- a/src/feature/rend/rendclient.c +++ b/src/feature/rend/rendclient.c @@ -150,8 +150,7 @@ rend_client_send_introduction(origin_circuit_t *introcirc, while ((conn = connection_get_by_type_state_rendquery(CONN_TYPE_AP, AP_CONN_STATE_CIRCUIT_WAIT, onion_address))) { - connection_ap_mark_as_non_pending_circuit(TO_ENTRY_CONN(conn)); - conn->state = AP_CONN_STATE_RENDDESC_WAIT; + connection_ap_mark_as_waiting_for_renddesc(TO_ENTRY_CONN(conn)); } } @@ -864,8 +863,7 @@ rend_client_report_intro_point_failure(extend_info_t *failed_intro, while ((conn = connection_get_by_type_state_rendquery(CONN_TYPE_AP, AP_CONN_STATE_CIRCUIT_WAIT, onion_address))) { - connection_ap_mark_as_non_pending_circuit(TO_ENTRY_CONN(conn)); - conn->state = AP_CONN_STATE_RENDDESC_WAIT; + connection_ap_mark_as_waiting_for_renddesc(TO_ENTRY_CONN(conn)); } return 0; |