aboutsummaryrefslogtreecommitdiff
path: root/src/or/rendcache.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@ev0ke.net>2015-06-25 16:13:15 -0400
committerNick Mathewson <nickm@torproject.org>2015-08-11 09:34:41 -0400
commit1070be8217c26c8917323ead944124e2cd14f9f2 (patch)
tree5f23c56753955ca87927a32f9ca106e946f91a1e /src/or/rendcache.c
parentd06af95ba3fdcb0c9820dcf34146ba68458d5e46 (diff)
downloadtor-1070be8217c26c8917323ead944124e2cd14f9f2.tar.gz
tor-1070be8217c26c8917323ead944124e2cd14f9f2.zip
Use an enum for INTRO_POINT_FAILURE_*
Safer, wiser, stronger! Signed-off-by: David Goulet <dgoulet@ev0ke.net>
Diffstat (limited to 'src/or/rendcache.c')
-rw-r--r--src/or/rendcache.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/rendcache.c b/src/or/rendcache.c
index acb9447de8..8f3ddf5585 100644
--- a/src/or/rendcache.c
+++ b/src/or/rendcache.c
@@ -125,7 +125,7 @@ rend_cache_failure_intro_entry_free(rend_cache_failure_intro_t *entry)
/** Allocate a rend cache failure intro object and return it. <b>failure</b>
* is set into the object. This function can not fail. */
static rend_cache_failure_intro_t *
-rend_cache_failure_intro_entry_new(unsigned int failure)
+rend_cache_failure_intro_entry_new(rend_intro_point_failure_t failure)
{
rend_cache_failure_intro_t *entry = tor_malloc(sizeof(*entry));
entry->failure_type = failure;
@@ -309,7 +309,7 @@ not_found:
* <b>failure</b> in that object. */
static void
cache_failure_intro_add(const uint8_t *identity, const char *service_id,
- unsigned int failure)
+ rend_intro_point_failure_t failure)
{
rend_cache_failure_t *fail_entry;
rend_cache_failure_intro_t *entry;
@@ -376,7 +376,8 @@ validate_intro_point_failure(const rend_service_descriptor_t *desc,
* <b>identity</b> and service ID <b>service_id</b>. If an entry already
* exists in the cache, the failure type is changed with <b>failure</b>. */
void
-rend_cache_intro_failure_note(unsigned int failure, const uint8_t *identity,
+rend_cache_intro_failure_note(rend_intro_point_failure_t failure,
+ const uint8_t *identity,
const char *service_id)
{
int found;