tor/src/feature/dirauth/dirauth_sys.c

41 lines
989 B
C
Raw Normal View History

/* Copyright (c) 2001 Matej Pfajfar.
* Copyright (c) 2001-2004, Roger Dingledine.
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
* Copyright (c) 2007-2019, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#include "core/or/or.h"
2019-04-30 18:48:00 +02:00
#include "feature/dirauth/bwauth.h"
#include "feature/dirauth/dirauth_sys.h"
#include "feature/dirauth/dirvote.h"
#include "feature/dirauth/dirauth_periodic.h"
2019-04-30 18:52:00 +02:00
#include "feature/dirauth/keypin.h"
#include "feature/dirauth/process_descs.h"
#include "lib/subsys/subsys.h"
static int
subsys_dirauth_initialize(void)
{
dirauth_register_periodic_events();
return 0;
}
static void
subsys_dirauth_shutdown(void)
{
dirserv_free_fingerprint_list();
dirvote_free_all();
2019-04-30 18:48:00 +02:00
dirserv_clear_measured_bw_cache();
2019-04-30 18:52:00 +02:00
keypin_close_journal();
}
const struct subsys_fns_t sys_dirauth = {
.name = "dirauth",
.supported = true,
.level = 70,
.initialize = subsys_dirauth_initialize,
.shutdown = subsys_dirauth_shutdown,
};