mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 14:23:30 +01:00
Refactor HS client state-clearing code into a separate function
This commit is contained in:
parent
b0e7925c02
commit
d7af8a2f07
@ -853,9 +853,7 @@ signewnym_impl(time_t now)
|
|||||||
|
|
||||||
circuit_expire_all_dirty_circs();
|
circuit_expire_all_dirty_circs();
|
||||||
addressmap_clear_transient();
|
addressmap_clear_transient();
|
||||||
rend_cache_purge();
|
rend_client_purge_state();
|
||||||
rend_client_cancel_descriptor_fetches();
|
|
||||||
rend_client_purge_last_hid_serv_requests();
|
|
||||||
time_of_last_signewnym = now;
|
time_of_last_signewnym = now;
|
||||||
signewnym_is_pending = 0;
|
signewnym_is_pending = 0;
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,16 @@ static extend_info_t *rend_client_get_random_intro_impl(
|
|||||||
const rend_cache_entry_t *rend_query,
|
const rend_cache_entry_t *rend_query,
|
||||||
const int strict, const int warnings);
|
const int strict, const int warnings);
|
||||||
|
|
||||||
|
/** Purge all potentially remotely-detectable state held in the hidden
|
||||||
|
* service client code. Called on SIGNAL NEWNYM. */
|
||||||
|
void
|
||||||
|
rend_client_purge_state(void)
|
||||||
|
{
|
||||||
|
rend_cache_purge();
|
||||||
|
rend_client_cancel_descriptor_fetches();
|
||||||
|
rend_client_purge_last_hid_serv_requests();
|
||||||
|
}
|
||||||
|
|
||||||
/** Called when we've established a circuit to an introduction point:
|
/** Called when we've established a circuit to an introduction point:
|
||||||
* send the introduction request. */
|
* send the introduction request. */
|
||||||
void
|
void
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
#ifndef _TOR_RENDCLIENT_H
|
#ifndef _TOR_RENDCLIENT_H
|
||||||
#define _TOR_RENDCLIENT_H
|
#define _TOR_RENDCLIENT_H
|
||||||
|
|
||||||
|
void rend_client_purge_state(void);
|
||||||
|
|
||||||
void rend_client_introcirc_has_opened(origin_circuit_t *circ);
|
void rend_client_introcirc_has_opened(origin_circuit_t *circ);
|
||||||
void rend_client_rendcirc_has_opened(origin_circuit_t *circ);
|
void rend_client_rendcirc_has_opened(origin_circuit_t *circ);
|
||||||
int rend_client_introduction_acked(origin_circuit_t *circ,
|
int rend_client_introduction_acked(origin_circuit_t *circ,
|
||||||
|
Loading…
Reference in New Issue
Block a user