mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Fix check-spaces issues in master
This commit is contained in:
parent
1065a5ef29
commit
a740994c77
@ -1632,13 +1632,14 @@ connection_dir_client_reached_eof(dir_connection_t *conn)
|
|||||||
if (status_code == 503) {
|
if (status_code == 503) {
|
||||||
routerstatus_t *rs;
|
routerstatus_t *rs;
|
||||||
trusted_dir_server_t *ds;
|
trusted_dir_server_t *ds;
|
||||||
|
const char *id_digest = conn->identity_digest;
|
||||||
log_info(LD_DIR,"Received http status code %d (%s) from server "
|
log_info(LD_DIR,"Received http status code %d (%s) from server "
|
||||||
"'%s:%d'. I'll try again soon.",
|
"'%s:%d'. I'll try again soon.",
|
||||||
status_code, escaped(reason), conn->_base.address,
|
status_code, escaped(reason), conn->_base.address,
|
||||||
conn->_base.port);
|
conn->_base.port);
|
||||||
if ((rs = router_get_mutable_consensus_status_by_id(conn->identity_digest)))
|
if ((rs = router_get_mutable_consensus_status_by_id(id_digest)))
|
||||||
rs->last_dir_503_at = now;
|
rs->last_dir_503_at = now;
|
||||||
if ((ds = router_get_trusteddirserver_by_digest(conn->identity_digest)))
|
if ((ds = router_get_trusteddirserver_by_digest(id_digest)))
|
||||||
ds->fake_status.last_dir_503_at = now;
|
ds->fake_status.last_dir_503_at = now;
|
||||||
|
|
||||||
tor_free(body); tor_free(headers); tor_free(reason);
|
tor_free(body); tor_free(headers); tor_free(reason);
|
||||||
|
@ -698,3 +698,4 @@ usable_consensus_flavor(void)
|
|||||||
return FLAV_NS;
|
return FLAV_NS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4899,7 +4899,7 @@ count_usable_descriptors(int *num_present, int *num_usable,
|
|||||||
int present;
|
int present;
|
||||||
++*num_usable; /* the consensus says we want it. */
|
++*num_usable; /* the consensus says we want it. */
|
||||||
if (md)
|
if (md)
|
||||||
present = NULL != (microdesc_cache_lookup_by_digest256(NULL, digest));
|
present = NULL != microdesc_cache_lookup_by_digest256(NULL, digest);
|
||||||
else
|
else
|
||||||
present = NULL != router_get_by_descriptor_digest(digest);
|
present = NULL != router_get_by_descriptor_digest(digest);
|
||||||
if (present) {
|
if (present) {
|
||||||
@ -4922,7 +4922,7 @@ count_loading_descriptors_progress(void)
|
|||||||
int num_present = 0, num_usable=0;
|
int num_present = 0, num_usable=0;
|
||||||
time_t now = time(NULL);
|
time_t now = time(NULL);
|
||||||
const networkstatus_t *consensus =
|
const networkstatus_t *consensus =
|
||||||
networkstatus_get_reasonably_live_consensus(now, usable_consensus_flavor());
|
networkstatus_get_reasonably_live_consensus(now,usable_consensus_flavor());
|
||||||
double fraction;
|
double fraction;
|
||||||
|
|
||||||
if (!consensus)
|
if (!consensus)
|
||||||
@ -4952,7 +4952,7 @@ update_router_have_minimum_dir_info(void)
|
|||||||
int res;
|
int res;
|
||||||
or_options_t *options = get_options();
|
or_options_t *options = get_options();
|
||||||
const networkstatus_t *consensus =
|
const networkstatus_t *consensus =
|
||||||
networkstatus_get_reasonably_live_consensus(now, usable_consensus_flavor());
|
networkstatus_get_reasonably_live_consensus(now,usable_consensus_flavor());
|
||||||
|
|
||||||
if (!consensus) {
|
if (!consensus) {
|
||||||
if (!networkstatus_get_latest_consensus())
|
if (!networkstatus_get_latest_consensus())
|
||||||
|
Loading…
Reference in New Issue
Block a user