diff options
author | Roger Dingledine <arma@torproject.org> | 2016-03-07 19:29:05 -0500 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2016-03-11 10:49:57 -0500 |
commit | edeba3d472e303a9a3263582d1e4c0fbcb5a28b8 (patch) | |
tree | 7fc0743c3ca4f8da4c1c07a6a32f432ec235f5bf /src/or/rendcache.h | |
parent | dc500c8cb4dc7643230d160d1b458a0acdadd242 (diff) | |
download | tor-edeba3d472e303a9a3263582d1e4c0fbcb5a28b8.tar.gz tor-edeba3d472e303a9a3263582d1e4c0fbcb5a28b8.zip |
simplify rend_cache_store_status_t back to a boolean
it used to be a tri-state, but now it's just a bi-state, so we can
take out all the machinery like the enum.
Diffstat (limited to 'src/or/rendcache.h')
-rw-r--r-- | src/or/rendcache.h | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/or/rendcache.h b/src/or/rendcache.h index 3eecd3b2a0..0e8b918753 100644 --- a/src/or/rendcache.h +++ b/src/or/rendcache.h @@ -64,19 +64,13 @@ int rend_cache_lookup_entry(const char *query, int version, int rend_cache_lookup_v2_desc_as_service(const char *query, rend_cache_entry_t **entry_out); int rend_cache_lookup_v2_desc_as_dir(const char *query, const char **desc); -/** Return value from rend_cache_store_v2_desc_as_{dir,client}. */ -typedef enum { - RCS_BADDESC = -1, /**< This descriptor is no good. */ - RCS_OKAY = 0 /**< All worked as expected */ -} rend_cache_store_status_t; - -rend_cache_store_status_t rend_cache_store_v2_desc_as_dir(const char *desc); -rend_cache_store_status_t rend_cache_store_v2_desc_as_service( - const char *desc); -rend_cache_store_status_t rend_cache_store_v2_desc_as_client(const char *desc, - const char *desc_id_base32, - const rend_data_t *rend_query, - rend_cache_entry_t **entry); + +int rend_cache_store_v2_desc_as_dir(const char *desc); +int rend_cache_store_v2_desc_as_service(const char *desc); +int rend_cache_store_v2_desc_as_client(const char *desc, + const char *desc_id_base32, + const rend_data_t *rend_query, + rend_cache_entry_t **entry); size_t rend_cache_get_total_allocation(void); void rend_cache_intro_failure_note(rend_intro_point_failure_t failure, |