Pārlūkot izejas kodu

don't warn if stats/bridge-stats is missing

if we try to read it to publish stats and it's not there,
that means there are no stats to publish.

reported by swisstorexit.
Roger Dingledine 17 gadi atpakaļ
vecāks
revīzija
fd5eb23c29
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      src/or/geoip.c

+ 1 - 1
src/or/geoip.c

@@ -1237,7 +1237,7 @@ load_bridge_stats(time_t now)
   if (check_private_dir(statsdir, CPD_CREATE) < 0)
   if (check_private_dir(statsdir, CPD_CREATE) < 0)
     goto done;
     goto done;
   fname = get_datadir_fname2("stats", "bridge-stats");
   fname = get_datadir_fname2("stats", "bridge-stats");
-  contents = read_file_to_str(fname, 0, NULL);
+  contents = read_file_to_str(fname, RFTS_IGNORE_MISSING, NULL);
   if (contents) {
   if (contents) {
     controller_str = parse_bridge_stats_controller(contents, now);
     controller_str = parse_bridge_stats_controller(contents, now);
     if (controller_str) {
     if (controller_str) {