Implement controller's "extendcircuit" directive.

Also refactor circuit building so we plan the whole path ahead
of time.


svn:r3797
This commit is contained in:
Roger Dingledine
2005-03-22 00:42:38 +00:00
parent 5d5b12ce75
commit 35953edae0
8 changed files with 230 additions and 151 deletions
+8 -1
View File
@@ -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;