diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-06-14 13:01:38 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-06-14 13:17:06 -0400 |
commit | 47c8433a0c3c579588e1e5d4f67f16843ba26bca (patch) | |
tree | a6424ad37a2337eb1dc24de50e1f3adc75c2c497 /src/or/dirserv.h | |
parent | 22efe2030901e7ef878c8ec358e819bbdb1239f6 (diff) | |
download | tor-47c8433a0c3c579588e1e5d4f67f16843ba26bca.tar.gz tor-47c8433a0c3c579588e1e5d4f67f16843ba26bca.zip |
Make the get_options() return const
This lets us make a lot of other stuff const, allows the compiler to
generate (slightly) better code, and will make me get slightly fewer
patches from folks who stick mutable stuff into or_options_t.
const: because not every input is an output!
Diffstat (limited to 'src/or/dirserv.h')
-rw-r--r-- | src/or/dirserv.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/or/dirserv.h b/src/or/dirserv.h index 8bd6d18f96..d3fd90ceb5 100644 --- a/src/or/dirserv.h +++ b/src/or/dirserv.h @@ -71,15 +71,16 @@ int list_server_status_v1(smartlist_t *routers, char **router_status_out, int dirserv_dump_directory_to_string(char **dir_out, crypto_pk_env_t *private_key); -int directory_fetches_from_authorities(or_options_t *options); -int directory_fetches_dir_info_early(or_options_t *options); -int directory_fetches_dir_info_later(or_options_t *options); -int directory_caches_v2_dir_info(or_options_t *options); +int directory_fetches_from_authorities(const or_options_t *options); +int directory_fetches_dir_info_early(const or_options_t *options); +int directory_fetches_dir_info_later(const or_options_t *options); +int directory_caches_v2_dir_info(const or_options_t *options); #define directory_caches_v1_dir_info(o) directory_caches_v2_dir_info(o) -int directory_caches_dir_info(or_options_t *options); -int directory_permits_begindir_requests(or_options_t *options); -int directory_permits_controller_requests(or_options_t *options); -int directory_too_idle_to_fetch_descriptors(or_options_t *options, time_t now); +int directory_caches_dir_info(const or_options_t *options); +int directory_permits_begindir_requests(const or_options_t *options); +int directory_permits_controller_requests(const or_options_t *options); +int directory_too_idle_to_fetch_descriptors(const or_options_t *options, + time_t now); void directory_set_dirty(void); cached_dir_t *dirserv_get_directory(void); |