diff options
author | David Goulet <dgoulet@torproject.org> | 2016-06-29 15:32:51 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2016-07-01 14:01:42 -0400 |
commit | 36e201dffc5d57d92113e1e68ad4b6a0a7b3471e (patch) | |
tree | 37b2b78e09cd0e51466b3a5386be3717e5e15663 /src/or/shared_random_state.h | |
parent | 4a1904c12665b98c356aba8e7b73a3f3fd508a5b (diff) | |
download | tor-36e201dffc5d57d92113e1e68ad4b6a0a7b3471e.tar.gz tor-36e201dffc5d57d92113e1e68ad4b6a0a7b3471e.zip |
prop250: Add a DEL state action and return const SRVs
The *get* state query functions for the SRVs now only return const pointers
and the DEL action needs to be used to delete the SRVs from the state.
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/shared_random_state.h')
-rw-r--r-- | src/or/shared_random_state.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/shared_random_state.h b/src/or/shared_random_state.h index 305797f0ff..e0b6e461ba 100644 --- a/src/or/shared_random_state.h +++ b/src/or/shared_random_state.h @@ -10,8 +10,9 @@ typedef enum { SR_STATE_ACTION_GET = 1, SR_STATE_ACTION_PUT = 2, - SR_STATE_ACTION_DEL_ALL = 3, - SR_STATE_ACTION_SAVE = 4, + SR_STATE_ACTION_DEL = 3, + SR_STATE_ACTION_DEL_ALL = 4, + SR_STATE_ACTION_SAVE = 5, } sr_state_action_t; /* Object in the state that can be queried through the state API. */ @@ -101,8 +102,8 @@ void sr_state_update(time_t valid_after); void sr_state_set_valid_after(time_t valid_after); sr_phase_t sr_state_get_phase(void); -sr_srv_t *sr_state_get_previous_srv(void); -sr_srv_t *sr_state_get_current_srv(void); +const sr_srv_t *sr_state_get_previous_srv(void); +const sr_srv_t *sr_state_get_current_srv(void); void sr_state_set_previous_srv(const sr_srv_t *srv); void sr_state_set_current_srv(const sr_srv_t *srv); void sr_state_clean_srvs(void); |