From 711ff6cdf79c32921f587d389b6ac25630a39d80 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Tue, 1 May 2018 11:10:58 -0400 Subject: [PATCH] Rename dirvote_common.{c|h} to voting_schedule.{c|h} No code behavior change. Part of #25988 Signed-off-by: David Goulet --- src/or/dirauth/dirvote.c | 2 +- src/or/dirauth/shared_random.c | 2 +- src/or/dirauth/shared_random_state.c | 2 +- src/or/dirserv.c | 2 +- src/or/include.am | 6 +++--- src/or/routerparse.c | 2 +- src/or/shared_random_common.c | 2 +- src/or/{dirvote_common.c => voting_schedule.c} | 6 +++--- src/or/{dirvote_common.h => voting_schedule.h} | 10 +++++----- src/test/test_dir_common.c | 2 +- 10 files changed, 18 insertions(+), 18 deletions(-) rename src/or/{dirvote_common.c => voting_schedule.c} (98%) rename src/or/{dirvote_common.h => voting_schedule.h} (91%) diff --git a/src/or/dirauth/dirvote.c b/src/or/dirauth/dirvote.c index 11c94bb6a..1d8124413 100644 --- a/src/or/dirauth/dirvote.c +++ b/src/or/dirauth/dirvote.c @@ -10,7 +10,6 @@ #include "directory.h" #include "dirserv.h" #include "dirvote.h" -#include "dirvote_common.h" #include "microdesc.h" #include "networkstatus.h" #include "nodelist.h" @@ -25,6 +24,7 @@ #include "entrynodes.h" /* needed for guardfraction methods */ #include "torcert.h" #include "shared_random_state.h" +#include "voting_schedule.h" /** * \file dirvote.c diff --git a/src/or/dirauth/shared_random.c b/src/or/dirauth/shared_random.c index 7e4920415..fcf134aa4 100644 --- a/src/or/dirauth/shared_random.c +++ b/src/or/dirauth/shared_random.c @@ -91,7 +91,6 @@ #include "shared_random.h" #include "config.h" #include "confparse.h" -#include "dirvote_common.h" #include "networkstatus.h" #include "routerkeys.h" #include "router.h" @@ -99,6 +98,7 @@ #include "shared_random_state.h" #include "shared_random_common.h" #include "util.h" +#include "voting_schedule.h" #include "dirauth/dirvote.h" diff --git a/src/or/dirauth/shared_random_state.c b/src/or/dirauth/shared_random_state.c index ac8fb5c15..6b915abcf 100644 --- a/src/or/dirauth/shared_random_state.c +++ b/src/or/dirauth/shared_random_state.c @@ -14,7 +14,7 @@ #include "shared_random.h" #include "config.h" #include "confparse.h" -#include "dirvote_common.h" +#include "voting_schedule.h" #include "networkstatus.h" #include "router.h" #include "shared_random_state.h" diff --git a/src/or/dirserv.c b/src/or/dirserv.c index f3a774018..61383aa86 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -18,7 +18,6 @@ #include "control.h" #include "directory.h" #include "dirserv.h" -#include "dirvote_common.h" #include "hibernate.h" #include "keypin.h" #include "main.h" @@ -33,6 +32,7 @@ #include "routerparse.h" #include "routerset.h" #include "torcert.h" +#include "voting_schedule.h" #include "dirauth/dirvote.h" diff --git a/src/or/include.am b/src/or/include.am index bb505937a..d0937bab0 100644 --- a/src/or/include.am +++ b/src/or/include.am @@ -43,7 +43,6 @@ LIBTOR_A_SOURCES = \ src/or/cpuworker.c \ src/or/directory.c \ src/or/dirserv.c \ - src/or/dirvote_common.c \ src/or/dns.c \ src/or/dnsserv.c \ src/or/dos.c \ @@ -109,6 +108,7 @@ LIBTOR_A_SOURCES = \ src/or/status.c \ src/or/torcert.c \ src/or/tor_api.c \ + src/or/voting_schedule.c \ src/or/onion_ntor.c \ $(tor_platform_source) @@ -202,7 +202,6 @@ ORHEADERS = \ src/or/cpuworker.h \ src/or/directory.h \ src/or/dirserv.h \ - src/or/dirvote_common.h \ src/or/dns.h \ src/or/dns_structs.h \ src/or/dnsserv.h \ @@ -270,7 +269,8 @@ ORHEADERS = \ src/or/statefile.h \ src/or/status.h \ src/or/torcert.h \ - src/or/tor_api_internal.h + src/or/tor_api_internal.h \ + src/or/voting_schedule.h # We add the headers of the modules even though they are disabled so we can # properly compiled the entry points stub. diff --git a/src/or/routerparse.c b/src/or/routerparse.c index e4833b441..5d4be0870 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -75,7 +75,7 @@ #include "torcert.h" #include "sandbox.h" #include "shared_random_common.h" -#include "dirvote_common.h" +#include "voting_schedule.h" #include "dirauth/shared_random.h" #undef log diff --git a/src/or/shared_random_common.c b/src/or/shared_random_common.c index 7d897d953..810b8b377 100644 --- a/src/or/shared_random_common.c +++ b/src/or/shared_random_common.c @@ -12,7 +12,7 @@ #include "shared_random_common.h" #include "config.h" -#include "dirvote_common.h" +#include "voting_schedule.h" #include "networkstatus.h" #include "util.h" #include "util_format.h" diff --git a/src/or/dirvote_common.c b/src/or/voting_schedule.c similarity index 98% rename from src/or/dirvote_common.c rename to src/or/voting_schedule.c index 2ca655b52..9725a3273 100644 --- a/src/or/dirvote_common.c +++ b/src/or/voting_schedule.c @@ -2,14 +2,14 @@ /* See LICENSE for licensing information */ /** - * \file dirvote_common.c + * \file voting_schedule.c * \brief This file contains functions that are from the directory authority * subsystem related to voting specifically but used by many part of * tor. The full feature is built as part of the dirauth module. **/ -#define DIRVOTE_COMMON_PRIVATE -#include "dirvote_common.h" +#define VOTING_SCHEDULE_PRIVATE +#include "voting_schedule.h" #include "or.h" #include "config.h" diff --git a/src/or/dirvote_common.h b/src/or/voting_schedule.h similarity index 91% rename from src/or/dirvote_common.h rename to src/or/voting_schedule.h index 7999a4f26..b7c7f7ea9 100644 --- a/src/or/dirvote_common.h +++ b/src/or/voting_schedule.h @@ -2,12 +2,12 @@ /* See LICENSE for licensing information */ /** - * \file dirvote_common.h - * \brief Header file for dirvote_common.c. + * \file voting_schedule.h + * \brief Header file for voting_schedule.c. **/ -#ifndef TOR_DIRVOTE_COMMON_H -#define TOR_DIRVOTE_COMMON_H +#ifndef TOR_VOTING_SCHEDULE_H +#define TOR_VOTING_SCHEDULE_H #include "or.h" @@ -57,5 +57,5 @@ time_t dirvote_get_start_of_next_interval(time_t now, int offset); time_t dirvote_get_next_valid_after_time(void); -#endif /* TOR_DIRVOTE_COMMON_H */ +#endif /* TOR_VOTING_SCHEDULE_H */ diff --git a/src/test/test_dir_common.c b/src/test/test_dir_common.c index 02d3295ca..5f92154ea 100644 --- a/src/test/test_dir_common.c +++ b/src/test/test_dir_common.c @@ -10,10 +10,10 @@ #include "container.h" #include "or.h" #include "dirauth/dirvote.h" -#include "dirvote_common.h" #include "nodelist.h" #include "routerlist.h" #include "test_dir_common.h" +#include "voting_schedule.h" void dir_common_setup_vote(networkstatus_t **vote, time_t now); networkstatus_t * dir_common_add_rs_and_parse(networkstatus_t *vote,