aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Perry <mikeperry-git@fscked.org>2012-12-10 00:28:07 -0800
committerMike Perry <mikeperry-git@fscked.org>2012-12-10 00:28:07 -0800
commitd409c8a90d876c2f45a1c4ea14ddae44fa7c8f18 (patch)
tree18cee69a1157b9d4a944a625bafc84f6d8a9c9cc /src
parent43a00877cf01888229d5d34085a2b75748848af1 (diff)
downloadtor-d409c8a90d876c2f45a1c4ea14ddae44fa7c8f18.tar
tor-d409c8a90d876c2f45a1c4ea14ddae44fa7c8f18.tar.gz
More log message and space fixups.
Diffstat (limited to 'src')
-rw-r--r--src/or/circuitbuild.c22
-rw-r--r--src/or/relay.c2
2 files changed, 15 insertions, 9 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index f903bbf09..d39817c04 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -1436,18 +1436,22 @@ pathbias_check_close(origin_circuit_t *ocirc, int reason)
* streams could be bias */
log_info(LD_CIRC,
"Circuit %d closed without successful use for reason %d. "
- "Circuit purpose %d currently %s.",
+ "Circuit purpose %d currently %d,%s. Len %d.",
ocirc->global_identifier,
- reason, circ->purpose, circuit_state_to_string(circ->state));
+ reason, circ->purpose, ocirc->has_opened,
+ circuit_state_to_string(circ->state),
+ ocirc->build_state->desired_path_len);
pathbias_count_unusable(ocirc);
} else {
if (reason & END_CIRC_REASON_FLAG_REMOTE) {
/* Unused remote circ close reasons all could be bias */
log_info(LD_CIRC,
"Circuit %d remote-closed without successful use for reason %d. "
- "Circuit purpose %d currently %s.",
+ "Circuit purpose %d currently %d,%s. Len %d.",
ocirc->global_identifier,
- reason, circ->purpose, circuit_state_to_string(circ->state));
+ reason, circ->purpose, ocirc->has_opened,
+ circuit_state_to_string(circ->state),
+ ocirc->build_state->desired_path_len);
pathbias_count_collapse(ocirc);
} else if ((reason & ~END_CIRC_REASON_FLAG_REMOTE)
== END_CIRC_REASON_CHANNEL_CLOSED &&
@@ -1455,14 +1459,16 @@ pathbias_check_close(origin_circuit_t *ocirc, int reason)
circ->n_chan->reason_for_closing
!= CHANNEL_CLOSE_REQUESTED) {
/* If we didn't close the channel ourselves, it could be bias */
- /* FIXME: Only count bias if the network is live?
+ /* XXX: Only count bias if the network is live?
* What about clock jumps/suspends? */
log_info(LD_CIRC,
"Circuit %d's channel closed without successful use for reason "
- "%d, channel reason %d. Circuit purpose %d currently %s.",
- ocirc->global_identifier,
+ "%d, channel reason %d. Circuit purpose %d currently %d,%s. Len "
+ "%d.", ocirc->global_identifier,
reason, circ->n_chan->reason_for_closing,
- circ->purpose, circuit_state_to_string(circ->state));
+ circ->purpose, ocirc->has_opened,
+ circuit_state_to_string(circ->state),
+ ocirc->build_state->desired_path_len);
pathbias_count_collapse(ocirc);
} else {
pathbias_count_successful_close(ocirc);
diff --git a/src/or/relay.c b/src/or/relay.c
index 6ed4b930a..fd8f8579a 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -697,7 +697,7 @@ connection_ap_process_end_not_open(
/* Path bias: If we get a valid reason code from the exit,
* it wasn't due to tagging */
// XXX: This relies on recognized+digest being strong enough not
- // to be spoofable.. Is that a valid assumption?
+ // to be spoofable.. Is that a valid assumption?
// Or more accurately: is it better than nothing? Can the attack
// be done offline?
circ->path_state = PATH_STATE_USE_SUCCEEDED;