]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add a comment explaining why we do a certain redundant check
authorNick Mathewson <nickm@torproject.org>
Mon, 9 Apr 2018 16:58:17 +0000 (12:58 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 9 Apr 2018 16:58:17 +0000 (12:58 -0400)
Closes ticket 25291.

src/or/config.c

index 8658a13269ca0085ce59a0be96baea327afdb97e..3c3fd46e6f7b1182eb004c7feea17b19d51e97be 100644 (file)
@@ -2269,6 +2269,11 @@ options_act(const or_options_t *old_options)
     }
     if ((!old_options || !old_options->EntryStatistics) &&
         options->EntryStatistics && !should_record_bridge_info(options)) {
+      /* If we get here, we've started recording bridge info when we didn't
+       * do so before.  Note that "should_record_bridge_info()" will
+       * always be false at this point, because of the earlier block
+       * that cleared EntryStatistics when public_server_mode() was false.
+       * We're leaving it in as defensive programming. */
       if (geoip_is_loaded(AF_INET) || geoip_is_loaded(AF_INET6)) {
         geoip_entry_stats_init(now);
         print_notice = 1;