aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-08-07 08:05:56 -0400
committerNick Mathewson <nickm@torproject.org>2018-08-07 08:05:56 -0400
commit5e86a2868319f8aa55d2858fdb4d83e6f9f69120 (patch)
tree5a7401b6ff2c81ee0e59164f57cf98c32bc0f293 /src/core
parentabf88af4887782f6952d90755d64f946d4958e6d (diff)
parent882b2ad0aa46702e8420ef0d4bd788daff6f3ffd (diff)
downloadtor-5e86a2868319f8aa55d2858fdb4d83e6f9f69120.tar.gz
tor-5e86a2868319f8aa55d2858fdb4d83e6f9f69120.zip
Merge branch 'maint-0.3.4'
Diffstat (limited to 'src/core')
-rw-r--r--src/core/mainloop/periodic.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/mainloop/periodic.c b/src/core/mainloop/periodic.c
index c17c0c56d2..df5317eb34 100644
--- a/src/core/mainloop/periodic.c
+++ b/src/core/mainloop/periodic.c
@@ -141,8 +141,8 @@ periodic_event_destroy(periodic_event_item_t *event)
event->last_action_time = 0;
}
-/** Enable the given event which means the event is launched and then the
- * event's enabled flag is set. This can be called for an event that is
+/** Enable the given event by setting its "enabled" flag and scheduling it to
+ * run immediately in the event loop. This can be called for an event that is
* already enabled. */
void
periodic_event_enable(periodic_event_item_t *event)
@@ -153,7 +153,9 @@ periodic_event_enable(periodic_event_item_t *event)
return;
}
- periodic_event_launch(event);
+ tor_assert(event->ev);
+ event->enabled = 1;
+ mainloop_event_activate(event->ev);
}
/** Disable the given event which means the event is destroyed and then the