diff options
Diffstat (limited to 'src/or/hs_service.c')
-rw-r--r-- | src/or/hs_service.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/or/hs_service.c b/src/or/hs_service.c index d717b9ce2f..a20de94b11 100644 --- a/src/or/hs_service.c +++ b/src/or/hs_service.c @@ -2390,6 +2390,16 @@ service_add_fnames_to_list(const hs_service_t *service, smartlist_t *list) /* Public API */ /* ========== */ +/* Return the number of service we have configured and usable. */ +unsigned int +hs_service_get_num_services(void) +{ + if (hs_service_map == NULL) { + return 0; + } + return HT_SIZE(hs_service_map); +} + /* Called once an introduction circuit is closed. If the circuit doesn't have * a v3 identifier, it is ignored. */ void |