diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-04-30 17:46:19 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-04-30 17:46:19 +0000 |
commit | b27b09ae1e3909f411ebecd62b0b5514d4ee31c4 (patch) | |
tree | 868e54f30f74cec5be05cbc638b9f0bbfb7d0212 /src/or/rendcommon.c | |
parent | 18ba9fe81f159c3df0bbdcff4fe0efbcf3a0db56 (diff) | |
download | tor-b27b09ae1e3909f411ebecd62b0b5514d4ee31c4.tar.gz tor-b27b09ae1e3909f411ebecd62b0b5514d4ee31c4.zip |
r12581@catbus: nickm | 2007-04-30 13:39:21 -0400
Minor cleanups on hidden service usage patch from Karsten: tidy documentation; make free_all idempotent (and safe to call even if we have not yet initialized rephist); and stop using "l" as a variable name (it is too easy to confuse with "1").
svn:r10068
Diffstat (limited to 'src/or/rendcommon.c')
-rw-r--r-- | src/or/rendcommon.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c index 77fb984ba3..f9a237bb23 100644 --- a/src/or/rendcommon.c +++ b/src/or/rendcommon.c @@ -361,7 +361,7 @@ rend_cache_lookup_desc(const char *query, int version, const char **desc, * Return -1 if it's malformed or otherwise rejected; return 0 if * it's the same or older than one we've already got; return 1 if * it's novel. The published flag tells us if we store the descriptor - * in our role aus directory (1) or if we cache it as client (0). + * in our role as directory (1) or if we cache it as client (0). */ int rend_cache_store(const char *desc, size_t desc_len, int published) @@ -397,7 +397,7 @@ rend_cache_store(const char *desc, size_t desc_len, int published) rend_service_descriptor_free(parsed); return -1; } - /* report novel publication to statistic */ + /* report novel publication to statistics */ if (published && options->HSAuthorityRecordStats) { hs_usage_note_publish_total(query, time(NULL)); } @@ -418,7 +418,7 @@ rend_cache_store(const char *desc, size_t desc_len, int published) if (!e) { e = tor_malloc_zero(sizeof(rend_cache_entry_t)); strmap_set_lc(rend_cache, key, e); - /* report novel publication to statistic */ + /* report novel publication to statistics */ if (published && options->HSAuthorityRecordStats) { hs_usage_note_publish_novel(query, time(NULL)); } @@ -486,6 +486,7 @@ rend_process_relay_cell(circuit_t *circ, int command, size_t length, (void)r; } +/** Return the number of entries in our rendezvous descriptor cache. */ int rend_cache_size(void) { |