]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
reset_padding_counts is only once per 24h; it can be all.
authorNick Mathewson <nickm@torproject.org>
Tue, 13 Nov 2018 15:43:08 +0000 (10:43 -0500)
committerNick Mathewson <nickm@torproject.org>
Thu, 15 Nov 2018 16:17:22 +0000 (11:17 -0500)
src/core/mainloop/mainloop.c

index 176399b333a6c27a8a7a7705458a6f93eab396a1..6df51062a769323aee30a192c3690cab8f271e5d 100644 (file)
@@ -1376,9 +1376,11 @@ CALLBACK(second_elapsed);
 #define FL(name) (PERIODIC_EVENT_FLAG_ ## name)
 
 STATIC periodic_event_item_t periodic_events[] = {
-  /* Everyone needs to run those. */
+  /* Everyone needs to run these. They need to have very long timeouts for
+   * that to be safe. */
   CALLBACK(add_entropy, ALL, 0),
   CALLBACK(heartbeat, ALL, 0),
+  CALLBACK(reset_padding_counts, ALL, 0),
 
   /* This is a legacy catch-all callback that runs once per second if
    * we are online and active. */
@@ -1403,9 +1405,6 @@ STATIC periodic_event_item_t periodic_events[] = {
   /* XXXX investigate this. ??? */
   CALLBACK(write_stats_file, NET_PARTICIPANT, FL(FLUSH_ON_DISABLE)),
 
-  /* XXXX investigate this. ???? */
-  CALLBACK(reset_padding_counts, NET_PARTICIPANT, FL(FLUSH_ON_DISABLE)),
-
   /* Routers (bridge and relay) only. */
   CALLBACK(check_descriptor, ROUTER, FL(NEED_NET)),
   CALLBACK(check_ed_keys, ROUTER, 0),