From fd5eb23c29dc6c48e0a0ea44f8236b8b2f53a47b Mon Sep 17 00:00:00 2001
From: Roger Dingledine <arma@torproject.org>
Date: Tue, 12 Jan 2010 12:18:08 -0500
Subject: [PATCH] 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.
---
 src/or/geoip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/or/geoip.c b/src/or/geoip.c
index b0f97d4ff3..a00280e39d 100644
--- a/src/or/geoip.c
+++ b/src/or/geoip.c
@@ -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) {
-- 
GitLab