aboutsummaryrefslogtreecommitdiff
path: root/src/or/rendcommon.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-01-04 20:05:29 -0500
committerNick Mathewson <nickm@torproject.org>2015-01-12 13:47:52 -0500
commit3033ba9f5ec8eb4dea3e6778f6d7546cacf7ae57 (patch)
treed8ba8ccd5dee101c4da4308c2d76dbea954d50a8 /src/or/rendcommon.h
parenteda5cebd6c334c3e6fa82c6623f33592a8f77e60 (diff)
downloadtor-3033ba9f5ec8eb4dea3e6778f6d7546cacf7ae57.tar.gz
tor-3033ba9f5ec8eb4dea3e6778f6d7546cacf7ae57.zip
When OOM, free cached hidden service descriptors too.
Diffstat (limited to 'src/or/rendcommon.h')
-rw-r--r--src/or/rendcommon.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/rendcommon.h b/src/or/rendcommon.h
index 186326a0c1..1d02bb4357 100644
--- a/src/or/rendcommon.h
+++ b/src/or/rendcommon.h
@@ -33,7 +33,7 @@ void rend_intro_point_free(rend_intro_point_t *intro);
void rend_cache_init(void);
void rend_cache_clean(time_t now);
-void rend_cache_clean_v2_descs_as_dir(time_t now);
+void rend_cache_clean_v2_descs_as_dir(time_t now, size_t min_to_remove);
void rend_cache_purge(void);
void rend_cache_free_all(void);
int rend_valid_service_id(const char *query);
@@ -51,7 +51,6 @@ 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_client(const char *desc,
const char *desc_id_base32,
const rend_data_t *rend_query);
-
int rend_encode_v2_descriptors(smartlist_t *descs_out,
rend_service_descriptor_t *desc, time_t now,
uint8_t period, rend_auth_type_t auth_type,
@@ -64,6 +63,7 @@ int rend_id_is_in_interval(const char *a, const char *b, const char *c);
void rend_get_descriptor_id_bytes(char *descriptor_id_out,
const char *service_id,
const char *secret_id_part);
+size_t rend_cache_get_total_allocation(void);
#endif