Space fixes.

This commit is contained in:
Mike Perry 2012-12-09 23:47:04 -08:00
parent b75880d7b3
commit 4590993ff3
9 changed files with 36 additions and 31 deletions

View File

@ -1462,8 +1462,8 @@ pathbias_check_close(origin_circuit_t *ocirc, int reason)
/* FIXME: Only count bias if the network is live? /* FIXME: Only count bias if the network is live?
* What about clock jumps/suspends? */ * What about clock jumps/suspends? */
log_info(LD_CIRC, log_info(LD_CIRC,
"Circuit %d's channel closed without successful use for reason %d, " "Circuit %d's channel closed without successful use for reason "
"channel reason %d. Circuit purpose %d currently %s.", "%d, channel reason %d. Circuit purpose %d currently %s.",
ocirc->global_identifier, ocirc->global_identifier,
reason, circ->n_chan->reason_for_closing, reason, circ->n_chan->reason_for_closing,
circ->purpose, circuit_state_to_string(circ->state)); circ->purpose, circuit_state_to_string(circ->state));
@ -1622,7 +1622,7 @@ pathbias_get_closed_count(entry_guard_t *guard)
ocirc = TO_ORIGIN_CIRCUIT(circ); ocirc = TO_ORIGIN_CIRCUIT(circ);
if(!ocirc->cpath || !ocirc->cpath->extend_info) if (!ocirc->cpath || !ocirc->cpath->extend_info)
continue; continue;
if (ocirc->path_state >= PATH_STATE_BUILD_SUCCEEDED && if (ocirc->path_state >= PATH_STATE_BUILD_SUCCEEDED &&
@ -1680,8 +1680,9 @@ entry_guard_inc_circ_attempt_count(entry_guard_t *guard)
"were unusable, %d collapsed, and %d timed out. For " "were unusable, %d collapsed, and %d timed out. For "
"reference, your timeout cutoff is %ld seconds.", "reference, your timeout cutoff is %ld seconds.",
guard->nickname, hex_str(guard->identity, DIGEST_LEN), guard->nickname, hex_str(guard->identity, DIGEST_LEN),
(int)pathbias_get_closed_count(guard), (int)guard->circ_attempts, (int)pathbias_get_closed_count(guard),
(int)guard->circ_successes, (int)guard->unusable_circuits, (int)guard->circ_attempts, (int)guard->circ_successes,
(int)guard->unusable_circuits,
(int)guard->collapsed_circuits, (int)guard->timeouts, (int)guard->collapsed_circuits, (int)guard->timeouts,
(long)circ_times.close_ms/1000); (long)circ_times.close_ms/1000);
guard->path_bias_disabled = 1; guard->path_bias_disabled = 1;
@ -1698,8 +1699,9 @@ entry_guard_inc_circ_attempt_count(entry_guard_t *guard)
"were unusable, %d collapsed, and %d timed out. For " "were unusable, %d collapsed, and %d timed out. For "
"reference, your timeout cutoff is %ld seconds.", "reference, your timeout cutoff is %ld seconds.",
guard->nickname, hex_str(guard->identity, DIGEST_LEN), guard->nickname, hex_str(guard->identity, DIGEST_LEN),
(int)pathbias_get_closed_count(guard), (int)guard->circ_attempts, (int)pathbias_get_closed_count(guard),
(int)guard->circ_successes, (int)guard->unusable_circuits, (int)guard->circ_attempts, (int)guard->circ_successes,
(int)guard->unusable_circuits,
(int)guard->collapsed_circuits, (int)guard->timeouts, (int)guard->collapsed_circuits, (int)guard->timeouts,
(long)circ_times.close_ms/1000); (long)circ_times.close_ms/1000);
} }
@ -1716,8 +1718,9 @@ entry_guard_inc_circ_attempt_count(entry_guard_t *guard)
"were unusable, %d collapsed, and %d timed out. For " "were unusable, %d collapsed, and %d timed out. For "
"reference, your timeout cutoff is %ld seconds.", "reference, your timeout cutoff is %ld seconds.",
guard->nickname, hex_str(guard->identity, DIGEST_LEN), guard->nickname, hex_str(guard->identity, DIGEST_LEN),
(int)pathbias_get_closed_count(guard), (int)guard->circ_attempts, (int)pathbias_get_closed_count(guard),
(int)guard->circ_successes, (int)guard->unusable_circuits, (int)guard->circ_attempts, (int)guard->circ_successes,
(int)guard->unusable_circuits,
(int)guard->collapsed_circuits, (int)guard->timeouts, (int)guard->collapsed_circuits, (int)guard->timeouts,
(long)circ_times.close_ms/1000); (long)circ_times.close_ms/1000);
} }
@ -1732,8 +1735,9 @@ entry_guard_inc_circ_attempt_count(entry_guard_t *guard)
"were unusable, %d collapsed, and %d timed out. For " "were unusable, %d collapsed, and %d timed out. For "
"reference, your timeout cutoff is %ld seconds.", "reference, your timeout cutoff is %ld seconds.",
guard->nickname, hex_str(guard->identity, DIGEST_LEN), guard->nickname, hex_str(guard->identity, DIGEST_LEN),
(int)pathbias_get_closed_count(guard), (int)guard->circ_attempts, (int)pathbias_get_closed_count(guard),
(int)guard->circ_successes, (int)guard->unusable_circuits, (int)guard->circ_attempts, (int)guard->circ_successes,
(int)guard->unusable_circuits,
(int)guard->collapsed_circuits, (int)guard->timeouts, (int)guard->collapsed_circuits, (int)guard->timeouts,
(long)circ_times.close_ms/1000); (long)circ_times.close_ms/1000);
} }

View File

@ -59,3 +59,4 @@ void pathbias_count_timeout(origin_circuit_t *circ);
void pathbias_check_close(origin_circuit_t *circ, int reason); void pathbias_check_close(origin_circuit_t *circ, int reason);
#endif #endif

View File

@ -2184,13 +2184,13 @@ connection_ap_handshake_socks_reply(entry_connection_t *conn, char *reply,
endreason == END_STREAM_REASON_CONNRESET || endreason == END_STREAM_REASON_CONNRESET ||
endreason == END_STREAM_REASON_NOROUTE || endreason == END_STREAM_REASON_NOROUTE ||
endreason == END_STREAM_REASON_RESOURCELIMIT) { endreason == END_STREAM_REASON_RESOURCELIMIT) {
if(!conn->edge_.on_circuit || if (!conn->edge_.on_circuit ||
!CIRCUIT_IS_ORIGIN(conn->edge_.on_circuit)) { !CIRCUIT_IS_ORIGIN(conn->edge_.on_circuit)) {
// DNS remaps can trigger this. So can failed hidden service // DNS remaps can trigger this. So can failed hidden service
// lookups. // lookups.
log_info(LD_BUG, log_info(LD_BUG,
"(Harmless.) No origin circuit for successful SOCKS stream %ld. " "No origin circuit for successful SOCKS stream %ld. Reason: "
"Reason: %d", ENTRY_TO_CONN(conn)->global_identifier, endreason); "%d", ENTRY_TO_CONN(conn)->global_identifier, endreason);
} else { } else {
TO_ORIGIN_CIRCUIT(conn->edge_.on_circuit)->path_state TO_ORIGIN_CIRCUIT(conn->edge_.on_circuit)->path_state
= PATH_STATE_USE_SUCCEEDED; = PATH_STATE_USE_SUCCEEDED;

View File

@ -2586,7 +2586,7 @@ rend_service_rendezvous_has_opened(origin_circuit_t *circuit)
tor_assert(circuit->rend_data); tor_assert(circuit->rend_data);
/* Declare the circuit dirty to avoid reuse, and for path-bias */ /* Declare the circuit dirty to avoid reuse, and for path-bias */
if(!circuit->base_.timestamp_dirty) if (!circuit->base_.timestamp_dirty)
circuit->base_.timestamp_dirty = time(NULL); circuit->base_.timestamp_dirty = time(NULL);
hop = circuit->build_state->service_pending_final_cpath_ref->cpath; hop = circuit->build_state->service_pending_final_cpath_ref->cpath;