mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
stop being sneaky, especially if we're being incorrectly sneaky
svn:r5646
This commit is contained in:
parent
b0144276db
commit
7e0d62b14a
@ -1833,7 +1833,7 @@ helper_nodes_set_status_from_directory(void)
|
|||||||
if (! r) {
|
if (! r) {
|
||||||
if (! helper->unlisted_since) {
|
if (! helper->unlisted_since) {
|
||||||
helper->unlisted_since = time(NULL);
|
helper->unlisted_since = time(NULL);
|
||||||
++changed;
|
changed = 1;
|
||||||
warn(LD_CIRC,"Helper node '%s' is not listed by directories",
|
warn(LD_CIRC,"Helper node '%s' is not listed by directories",
|
||||||
helper->nickname);
|
helper->nickname);
|
||||||
severity = LOG_WARN;
|
severity = LOG_WARN;
|
||||||
@ -1842,7 +1842,7 @@ helper_nodes_set_status_from_directory(void)
|
|||||||
if (helper->unlisted_since) {
|
if (helper->unlisted_since) {
|
||||||
warn(LD_CIRC,"Helper node '%s' is listed again by directories",
|
warn(LD_CIRC,"Helper node '%s' is listed again by directories",
|
||||||
helper->nickname);
|
helper->nickname);
|
||||||
++changed;
|
changed = 1;
|
||||||
severity = LOG_WARN;
|
severity = LOG_WARN;
|
||||||
}
|
}
|
||||||
helper->unlisted_since = 0;
|
helper->unlisted_since = 0;
|
||||||
@ -1850,14 +1850,14 @@ helper_nodes_set_status_from_directory(void)
|
|||||||
if (! helper->down_since) {
|
if (! helper->down_since) {
|
||||||
helper->down_since = now;
|
helper->down_since = now;
|
||||||
warn(LD_CIRC, "Helper node '%s' is now down.", helper->nickname);
|
warn(LD_CIRC, "Helper node '%s' is now down.", helper->nickname);
|
||||||
++changed;
|
changed = 1;
|
||||||
severity = LOG_WARN;
|
severity = LOG_WARN;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (helper->down_since) {
|
if (helper->down_since) {
|
||||||
notice(LD_CIRC,"Helper node '%s' is up in latest directories",
|
notice(LD_CIRC,"Helper node '%s' is up in latest directories",
|
||||||
helper->nickname);
|
helper->nickname);
|
||||||
++changed;
|
changed = 1;
|
||||||
}
|
}
|
||||||
helper->down_since = 0;
|
helper->down_since = 0;
|
||||||
}
|
}
|
||||||
@ -1892,7 +1892,7 @@ helper_node_set_status(const char *digest, int succeeded)
|
|||||||
if (succeeded) {
|
if (succeeded) {
|
||||||
if (!helper->made_contact) {
|
if (!helper->made_contact) {
|
||||||
helper->made_contact = 1;
|
helper->made_contact = 1;
|
||||||
++changed;
|
changed = 1;
|
||||||
}
|
}
|
||||||
if (helper->down_since) {
|
if (helper->down_since) {
|
||||||
/*XXXX shouldn't be so loud. NM */
|
/*XXXX shouldn't be so loud. NM */
|
||||||
@ -1901,20 +1901,20 @@ helper_node_set_status(const char *digest, int succeeded)
|
|||||||
"%d/%d helpers usable.", helper->nickname,
|
"%d/%d helpers usable.", helper->nickname,
|
||||||
num_live_helpers(), smartlist_len(helper_nodes));
|
num_live_helpers(), smartlist_len(helper_nodes));
|
||||||
helper->down_since = 0;
|
helper->down_since = 0;
|
||||||
++changed;
|
changed = 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!helper->made_contact) { /* dump him */
|
if (!helper->made_contact) { /* dump him */
|
||||||
|
|
||||||
|
|
||||||
++changed;
|
changed = 1;
|
||||||
} else if (!helper->down_since) {
|
} else if (!helper->down_since) {
|
||||||
helper->down_since = time(NULL);
|
helper->down_since = time(NULL);
|
||||||
warn(LD_CIRC,
|
warn(LD_CIRC,
|
||||||
"Connection to helper node '%s' failed. %d/%d helpers usable.",
|
"Connection to helper node '%s' failed. %d/%d helpers usable.",
|
||||||
helper->nickname, num_live_helpers(),
|
helper->nickname, num_live_helpers(),
|
||||||
smartlist_len(helper_nodes));
|
smartlist_len(helper_nodes));
|
||||||
++changed;
|
changed = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user