28 char *thresholds = NULL;
29 char *published_thresholds_and_status = NULL;
30 char published[ISO_TIME_LEN+1];
33 char *fingerprint_line = NULL;
39 fingerprint, 0) >= 0) {
40 tor_asprintf(&fingerprint_line,
"fingerprint %s\n", fingerprint);
42 log_warn(
LD_BUG,
"Error computing fingerprint for bridge status.");
45 dirserv_compute_bridge_flag_thresholds();
48 "published %s\nflag-thresholds %s\n%s%s",
49 published, thresholds, fingerprint_line ? fingerprint_line :
"",
51 fname = get_datadir_fname(
"networkstatus-bridges");
53 log_warn(
LD_DIRSERV,
"Unable to write networkstatus-bridges file.");
56 tor_free(published_thresholds_and_status);
void bridgeauth_dump_bridge_status_to_file(time_t now)
Header file for config.c.
int crypto_pk_get_fingerprint(crypto_pk_t *pk, char *fp_out, int add_space)
int write_str_to_file(const char *fname, const char *str, int bin)
char * networkstatus_getinfo_by_purpose(const char *purpose_string, time_t now)
Header file for networkstatus.c.
Master header file for Tor-specific functionality.
int tor_asprintf(char **strp, const char *fmt,...)
const routerinfo_t * router_get_my_routerinfo(void)
Header file for router.c.
Router descriptor structure.
crypto_pk_t * identity_pkey
void format_iso_time(char *buf, time_t t)
char * dirserv_get_flag_thresholds_line(void)
void dirserv_set_bridges_running(time_t now)
Header file for voteflags.c.