summaryrefslogtreecommitdiff
path: root/src/or/hs_service.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2017-01-16 13:29:03 -0500
committerDavid Goulet <dgoulet@torproject.org>2017-07-13 16:49:08 -0400
commit765ed5dac160b28fb658560e8f39d1d7ab3d1c75 (patch)
tree6f101ed5f4b399c3c0c2faf5056c3ff600895fcf /src/or/hs_service.c
parent02e2edeb33224461d1fbb879722c0948171b9688 (diff)
downloadtor-765ed5dac160b28fb658560e8f39d1d7ab3d1c75.tar.gz
tor-765ed5dac160b28fb658560e8f39d1d7ab3d1c75.zip
prop224: Add a init/free_all function for the whole subsystem
Introduces hs_init() located in hs_common.c which initialize the entire HS v3 subsystem. This is done _prior_ to the options being loaded because we need to allocate global data structure before we load the configuration. The hs_free_all() is added to release everything from tor_free_all(). Note that both functions do NOT handle v2 service subsystem but does handle the common interface that both v2 and v3 needs such as the cache and circuitmap. Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/hs_service.c')
-rw-r--r--src/or/hs_service.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/hs_service.c b/src/or/hs_service.c
index c62aa8b075..16ffc4885c 100644
--- a/src/or/hs_service.c
+++ b/src/or/hs_service.c
@@ -97,6 +97,13 @@ hs_service_free(hs_service_t *service)
tor_free(service);
}
+/* Initialize the service HS subsystem. */
+void
+hs_service_init(void)
+{
+ return;
+}
+
/* Release all global the storage of hidden service subsystem. */
void
hs_service_free_all(void)