mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
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>
This commit is contained in:
parent
d0682fe0f1
commit
00b59d9281
@ -2377,8 +2377,7 @@ circuit_get_open_circ_or_launch(entry_connection_t *conn,
|
|||||||
} else {
|
} else {
|
||||||
hs_client_refetch_hsdesc(&edge_conn->hs_ident->identity_pk);
|
hs_client_refetch_hsdesc(&edge_conn->hs_ident->identity_pk);
|
||||||
}
|
}
|
||||||
connection_ap_mark_as_non_pending_circuit(conn);
|
connection_ap_mark_as_waiting_for_renddesc(conn);
|
||||||
ENTRY_TO_CONN(conn)->state = AP_CONN_STATE_RENDDESC_WAIT;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
log_info(LD_REND,"Chose %s as intro point for '%s'.",
|
log_info(LD_REND,"Chose %s as intro point for '%s'.",
|
||||||
|
@ -142,8 +142,7 @@ flag_all_conn_wait_desc(const ed25519_public_key_t *service_identity_pk)
|
|||||||
if (edge_conn->hs_ident &&
|
if (edge_conn->hs_ident &&
|
||||||
ed25519_pubkey_eq(&edge_conn->hs_ident->identity_pk,
|
ed25519_pubkey_eq(&edge_conn->hs_ident->identity_pk,
|
||||||
service_identity_pk)) {
|
service_identity_pk)) {
|
||||||
connection_ap_mark_as_non_pending_circuit(TO_ENTRY_CONN(conn));
|
connection_ap_mark_as_waiting_for_renddesc(TO_ENTRY_CONN(conn));
|
||||||
conn->state = AP_CONN_STATE_RENDDESC_WAIT;
|
|
||||||
}
|
}
|
||||||
} SMARTLIST_FOREACH_END(conn);
|
} SMARTLIST_FOREACH_END(conn);
|
||||||
|
|
||||||
|
@ -150,8 +150,7 @@ rend_client_send_introduction(origin_circuit_t *introcirc,
|
|||||||
|
|
||||||
while ((conn = connection_get_by_type_state_rendquery(CONN_TYPE_AP,
|
while ((conn = connection_get_by_type_state_rendquery(CONN_TYPE_AP,
|
||||||
AP_CONN_STATE_CIRCUIT_WAIT, onion_address))) {
|
AP_CONN_STATE_CIRCUIT_WAIT, onion_address))) {
|
||||||
connection_ap_mark_as_non_pending_circuit(TO_ENTRY_CONN(conn));
|
connection_ap_mark_as_waiting_for_renddesc(TO_ENTRY_CONN(conn));
|
||||||
conn->state = AP_CONN_STATE_RENDDESC_WAIT;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -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,
|
while ((conn = connection_get_by_type_state_rendquery(CONN_TYPE_AP,
|
||||||
AP_CONN_STATE_CIRCUIT_WAIT,
|
AP_CONN_STATE_CIRCUIT_WAIT,
|
||||||
onion_address))) {
|
onion_address))) {
|
||||||
connection_ap_mark_as_non_pending_circuit(TO_ENTRY_CONN(conn));
|
connection_ap_mark_as_waiting_for_renddesc(TO_ENTRY_CONN(conn));
|
||||||
conn->state = AP_CONN_STATE_RENDDESC_WAIT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user