summaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2016-09-05 18:54:59 +0300
committerNick Mathewson <nickm@torproject.org>2016-12-14 15:17:58 -0500
commit9192e5928c0b974ba7c1b908b6f2538cd6f56c79 (patch)
tree53beb25a1a0d8d1c2e45646a0f5b06462d869ed6 /src/or/main.c
parent2b9abbef2e5d0e58e5a15b7cf8cd03965aa70117 (diff)
downloadtor-9192e5928c0b974ba7c1b908b6f2538cd6f56c79.tar.gz
tor-9192e5928c0b974ba7c1b908b6f2538cd6f56c79.zip
prop224 prepwork: Use of HS circuitmap in existing HS code.
The new HS circuitmap API replaces old public functions as follows: circuit_clear_rend_token -> hs_circuitmap_remove_circuit circuit_get_rendezvous -> hs_circuitmap_get_rend_circ circuit_get_intro_point -> hs_circuitmap_get_intro_circ_v2 circuit_set_rendezvous_cookie -> hs_circuitmap_register_rend_circ circuit_set_intro_point_digest -> hs_circuitmap_register_intro_circ_v2 This commit also removes the old rendinfo code that is now unused. It also fixes the broken rendinfo unittests.
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c
index c10f62724a..ff477dba5b 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -74,6 +74,7 @@
#include "geoip.h"
#include "hibernate.h"
#include "hs_cache.h"
+#include "hs_circuitmap.h"
#include "keypin.h"
#include "main.h"
#include "microdesc.h"
@@ -2400,6 +2401,9 @@ do_main_loop(void)
}
}
+ /* Initialize relay-side HS circuitmap */
+ hs_circuitmap_init();
+
/* set up once-a-second callback. */
if (! second_timer) {
struct timeval one_second;
@@ -3108,6 +3112,7 @@ tor_free_all(int postfork)
connection_edge_free_all();
scheduler_free_all();
nodelist_free_all();
+ hs_circuitmap_free_all();
microdesc_free_all();
routerparse_free_all();
ext_orport_free_all();