diff options
author | David Goulet <dgoulet@torproject.org> | 2017-06-29 11:18:24 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2017-07-13 16:50:09 -0400 |
commit | 87f6f96f4707cc18a58c5de8be0ee10f1893673d (patch) | |
tree | 14c0b9d20c55facb1f720e4133b39eabb1e2c65a /src/or/rendservice.c | |
parent | f76f8731995917366b53f729befd450ed3d417d1 (diff) | |
download | tor-87f6f96f4707cc18a58c5de8be0ee10f1893673d.tar.gz tor-87f6f96f4707cc18a58c5de8be0ee10f1893673d.zip |
hs: Add rend_service_init()
Initialize both the global and staging service lists.
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/rendservice.c')
-rw-r--r-- | src/or/rendservice.c | 11 |
1 files changed, 11 insertions, 0 deletions
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 <b>service</b>. Use the <b>service_list</b> to make sure there * is no duplicate entry for the given service object. Return 0 if valid else * -1 if not.*/ |