From 87f6f96f4707cc18a58c5de8be0ee10f1893673d Mon Sep 17 00:00:00 2001 From: David Goulet Date: Thu, 29 Jun 2017 11:18:24 -0400 Subject: hs: Add rend_service_init() Initialize both the global and staging service lists. Signed-off-by: David Goulet --- src/or/rendservice.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/or/rendservice.c') diff --git a/src/or/rendservice.c b/src/or/rendservice.c index 358efd0ed9..67da760069 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -257,6 +257,17 @@ rend_service_free_all(void) rend_service_free_staging_list(); } +/* Initialize the subsystem. */ +void +rend_service_init(void) +{ + tor_assert(!rend_service_list); + tor_assert(!rend_service_staging_list); + + rend_service_list = smartlist_new(); + rend_service_staging_list = smartlist_new(); +} + /* Validate a service. Use the service_list to make sure there * is no duplicate entry for the given service object. Return 0 if valid else * -1 if not.*/ -- cgit v1.2.3-54-g00ecf