in circuit_list_path(), don't redundantly print the intended exit

nickname when the circuit is open.


svn:r4622
This commit is contained in:
Roger Dingledine 2005-07-20 20:33:13 +00:00
parent d049cccdc6
commit 11bd4bc521

View File

@ -84,11 +84,13 @@ circuit_list_path(circuit_t *circ, int verbose)
if (verbose) {
const char *nickname = build_state_get_exit_nickname(circ->build_state);
tor_snprintf(buf, sizeof(buf)-1, "%s%s circ (length %d, exit %s):",
tor_snprintf(buf, sizeof(buf)-1, "%s%s circ (length %d%s%s):",
circ->build_state->is_internal ? "internal" : "exit",
circ->build_state->need_uptime ? " (high-uptime)" : "",
circ->build_state->desired_path_len,
nickname?nickname:"*unnamed*");
circ->state == CIRCUIT_STATE_OPEN ? "" : ", exit ",
circ->state == CIRCUIT_STATE_OPEN ? "" :
(nickname?nickname:"*unnamed*"));
smartlist_add(elements, tor_strdup(buf));
}