aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2018-04-18 10:25:39 -0400
committerDavid Goulet <dgoulet@torproject.org>2018-04-23 10:57:28 -0400
commit87cb9ce90088bbe3e677804eca7c1ffa4f63a1cb (patch)
tree3b404220646bbe4fd2da2494bf1d8db43efc647c /src
parentf70fa67da6d22d7351bd8f50db0804c239ffa5d6 (diff)
downloadtor-87cb9ce90088bbe3e677804eca7c1ffa4f63a1cb.tar.gz
tor-87cb9ce90088bbe3e677804eca7c1ffa4f63a1cb.zip
main: Update periodic events comment based on latest code
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src')
-rw-r--r--src/or/main.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 565131cb32..0a796c0fae 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -1523,8 +1523,8 @@ teardown_periodic_events(void)
periodic_events_initialized = 0;
}
-/** Do a pass at all our periodic events, destroy those we don't need anymore
- * and enabled those we need now using the given options. */
+/** Do a pass at all our periodic events, disable those we don't need anymore
+ * and enable those we need now using the given options. */
static void
rescan_periodic_events(const or_options_t *options)
{
@@ -1547,15 +1547,15 @@ rescan_periodic_events(const or_options_t *options)
}
}
-/* We just got new options globally set, see if we need to destroy or setup
+/* We just got new options globally set, see if we need to enabled or disable
* periodic events. */
void
periodic_events_on_new_options(const or_options_t *options)
{
- /* Only if we've already initialized once the events, teardown them all and
- * reinitialize. It is just simpler that way instead of going through all
- * currently enabled events and trying to destroy only the one that could be
- * affected. */
+ /* Only if we've already initialized the events, rescan the list which will
+ * enable or disable events depending on our roles. This will be called at
+ * bootup and we don't want this function to initialize the events because
+ * they aren't set up at this stage. */
if (periodic_events_initialized) {
rescan_periodic_events(options);
}