mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +01:00
Use get_datadir_fname() accessor in networkstatus.c
This commit is contained in:
parent
36779df4c4
commit
2e872f6b32
@ -2260,7 +2260,6 @@ void
|
|||||||
networkstatus_dump_bridge_status_to_file(time_t now)
|
networkstatus_dump_bridge_status_to_file(time_t now)
|
||||||
{
|
{
|
||||||
char *status = networkstatus_getinfo_by_purpose("bridge", now);
|
char *status = networkstatus_getinfo_by_purpose("bridge", now);
|
||||||
const or_options_t *options = get_options();
|
|
||||||
char *fname = NULL;
|
char *fname = NULL;
|
||||||
char *thresholds = NULL;
|
char *thresholds = NULL;
|
||||||
char *published_thresholds_and_status = NULL;
|
char *published_thresholds_and_status = NULL;
|
||||||
@ -2282,8 +2281,7 @@ networkstatus_dump_bridge_status_to_file(time_t now)
|
|||||||
"published %s\nflag-thresholds %s\n%s%s",
|
"published %s\nflag-thresholds %s\n%s%s",
|
||||||
published, thresholds, fingerprint_line ? fingerprint_line : "",
|
published, thresholds, fingerprint_line ? fingerprint_line : "",
|
||||||
status);
|
status);
|
||||||
tor_asprintf(&fname, "%s"PATH_SEPARATOR"networkstatus-bridges",
|
fname = get_datadir_fname("networkstatus-bridges");
|
||||||
options->DataDirectory);
|
|
||||||
write_str_to_file(fname,published_thresholds_and_status,0);
|
write_str_to_file(fname,published_thresholds_and_status,0);
|
||||||
tor_free(thresholds);
|
tor_free(thresholds);
|
||||||
tor_free(published_thresholds_and_status);
|
tor_free(published_thresholds_and_status);
|
||||||
|
Loading…
Reference in New Issue
Block a user