]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add a warning if we can't write networkstatus-bridges
authorNick Mathewson <nickm@torproject.org>
Fri, 2 Nov 2018 17:32:43 +0000 (13:32 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 2 Nov 2018 17:32:43 +0000 (13:32 -0400)
Fixes CID 1440818.

src/feature/nodelist/networkstatus.c

index ec1a69b9e2dbb5ff0f712933b5f21571f12f5a8c..f1def9afb16672e7aaf1c94465279cf33e4886b5 100644 (file)
@@ -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);