aboutsummaryrefslogtreecommitdiff
path: root/src/feature
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-11-02 13:32:43 -0400
committerNick Mathewson <nickm@torproject.org>2018-11-02 13:32:43 -0400
commit674ef53a7e953a724b4f3bfe2f1e06ba2897bba2 (patch)
tree43ae62e70fc9c0dfb1bb7c0d86eb86cf87a01fc5 /src/feature
parent18a4eaf5c142bae55780716464d43c2f8a9e2e49 (diff)
downloadtor-674ef53a7e953a724b4f3bfe2f1e06ba2897bba2.tar.gz
tor-674ef53a7e953a724b4f3bfe2f1e06ba2897bba2.zip
Add a warning if we can't write networkstatus-bridges
Fixes CID 1440818.
Diffstat (limited to 'src/feature')
-rw-r--r--src/feature/nodelist/networkstatus.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/feature/nodelist/networkstatus.c b/src/feature/nodelist/networkstatus.c
index ec1a69b9e2..f1def9afb1 100644
--- a/src/feature/nodelist/networkstatus.c
+++ b/src/feature/nodelist/networkstatus.c
@@ -2403,7 +2403,9 @@ networkstatus_dump_bridge_status_to_file(time_t now)
published, thresholds, fingerprint_line ? fingerprint_line : "",
status);
fname = get_datadir_fname("networkstatus-bridges");
- write_str_to_file(fname,published_thresholds_and_status,0);
+ if (write_str_to_file(fname,published_thresholds_and_status,0)<0) {
+ log_warn(LD_DIRSERV, "Unable to write networkstatus-bridges file.");
+ }
tor_free(thresholds);
tor_free(published_thresholds_and_status);
tor_free(fname);