summaryrefslogtreecommitdiff
path: root/src/or/networkstatus.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-10-13 13:22:10 -0400
committerNick Mathewson <nickm@torproject.org>2014-10-13 13:22:10 -0400
commit032e3b733f7bf304a778459597e7ed7b371234c7 (patch)
treeae3d0893f48a131fa30685395c9144c16fb2354a /src/or/networkstatus.c
parentf1782d9c4c6d0b299d2fb9bb37a58f515aed4abe (diff)
parent374b531dba966780f2e59163ca80b1b5a0b8f14c (diff)
downloadtor-032e3b733f7bf304a778459597e7ed7b371234c7.tar.gz
tor-032e3b733f7bf304a778459597e7ed7b371234c7.zip
Merge remote-tracking branch 'isis/bug12951_r1'
Diffstat (limited to 'src/or/networkstatus.c')
-rw-r--r--src/or/networkstatus.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
index c7bed9b059..ef26644580 100644
--- a/src/or/networkstatus.c
+++ b/src/or/networkstatus.c
@@ -1678,17 +1678,22 @@ networkstatus_dump_bridge_status_to_file(time_t now)
char *status = networkstatus_getinfo_by_purpose("bridge", now);
const or_options_t *options = get_options();
char *fname = NULL;
- char *thresholds = NULL, *thresholds_and_status = NULL;
+ char *thresholds = NULL;
+ char *published_thresholds_and_status = NULL;
routerlist_t *rl = router_get_routerlist();
+ char published[ISO_TIME_LEN+1];
+
+ format_iso_time(published, now);
dirserv_compute_bridge_flag_thresholds(rl);
thresholds = dirserv_get_flag_thresholds_line();
- tor_asprintf(&thresholds_and_status, "flag-thresholds %s\n%s",
- thresholds, status);
+ tor_asprintf(&published_thresholds_and_status,
+ "published %s\nflag-thresholds %s\n%s",
+ published, thresholds, status);
tor_asprintf(&fname, "%s"PATH_SEPARATOR"networkstatus-bridges",
options->DataDirectory);
- write_str_to_file(fname,thresholds_and_status,0);
+ write_str_to_file(fname,published_thresholds_and_status,0);
tor_free(thresholds);
- tor_free(thresholds_and_status);
+ tor_free(published_thresholds_and_status);
tor_free(fname);
tor_free(status);
}