]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
don't warn if stats/bridge-stats is missing
authorRoger Dingledine <arma@torproject.org>
Tue, 12 Jan 2010 17:18:08 +0000 (12:18 -0500)
committerRoger Dingledine <arma@torproject.org>
Fri, 15 Jan 2010 20:56:53 +0000 (15:56 -0500)
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.

src/or/geoip.c

index b0f97d4ff3e8c80c2e86b5b1cb8e13033d70a125..a00280e39dafa079a77b80d12b126fbe1270e9d1 100644 (file)
@@ -1237,7 +1237,7 @@ load_bridge_stats(time_t now)
   if (check_private_dir(statsdir, CPD_CREATE) < 0)
     goto done;
   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) {
     controller_str = parse_bridge_stats_controller(contents, now);
     if (controller_str) {