diff options
author | Roger Dingledine <arma@torproject.org> | 2005-03-22 00:42:38 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2005-03-22 00:42:38 +0000 |
commit | 35953edae073e69efe06f4ea313066b514b772a0 (patch) | |
tree | 3f89981b90370e5c4c727e3b86905813871828d9 /src/or/rendclient.c | |
parent | 5d5b12ce750e60041f7654449129fe268ed76a2e (diff) | |
download | tor-35953edae073e69efe06f4ea313066b514b772a0.tar.gz tor-35953edae073e69efe06f4ea313066b514b772a0.zip |
Implement controller's "extendcircuit" directive.
Also refactor circuit building so we plan the whole path ahead
of time.
svn:r3797
Diffstat (limited to 'src/or/rendclient.c')
-rw-r--r-- | src/or/rendclient.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/or/rendclient.c b/src/or/rendclient.c index 7111dadda6..7f44bc24f6 100644 --- a/src/or/rendclient.c +++ b/src/or/rendclient.c @@ -225,8 +225,15 @@ rend_client_introduction_acked(circuit_t *circ, } log_fn(LOG_INFO, "Chose new intro point %s for %s (circ %d)", nickname, circ->rend_query, circ->n_circ_id); - if (circuit_append_new_hop(circ, nickname, r->identity_digest) < 0) + tor_free(nickname); + circuit_append_new_exit(circ, r); + circ->state = CIRCUIT_STATE_BUILDING; + if (circuit_send_next_onion_skin(circ)<0) { + log_fn(LOG_WARN, "Couldn't extend circuit to new point '%s'.", + circ->build_state->chosen_exit_name); + circuit_mark_for_close(circ); return -1; + } } } return 0; |