|
@@ -246,7 +246,7 @@ again:
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
+
|
|
* build-state based on our arguments. */
|
|
* build-state based on our arguments. */
|
|
circuit_t *
|
|
circuit_t *
|
|
circuit_init(uint8_t purpose, int need_uptime, int need_capacity, int internal) {
|
|
circuit_init(uint8_t purpose, int need_uptime, int need_capacity, int internal) {
|
|
@@ -1168,8 +1168,9 @@ onion_pick_cpath_exit(circuit_t *circ, routerinfo_t *exit) {
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
+
|
|
- * to <b>exit</b>, and get it to send the next extend cell.
|
|
+ * hop to the cpath reflecting this. Don't send the next extend cell --
|
|
|
|
+ * the caller will do this if it wants to.
|
|
*/
|
|
*/
|
|
int
|
|
int
|
|
circuit_append_new_exit(circuit_t *circ, routerinfo_t *exit) {
|
|
circuit_append_new_exit(circuit_t *circ, routerinfo_t *exit) {
|
|
@@ -1183,6 +1184,22 @@ circuit_append_new_exit(circuit_t *circ, routerinfo_t *exit) {
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ * to <b>exit</b>, and get it to send the next extend cell. If you can't
|
|
|
|
+ * send the extend cell, mark the circuit for close and return -1, else
|
|
|
|
+ * return 0. */
|
|
|
|
+int circuit_extend_to_new_exit(circuit_t *circ, routerinfo_t *exit) {
|
|
|
|
+ circuit_append_new_exit(circ, exit);
|
|
|
|
+ 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;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
|
|
* and available for building circuits through.
|
|
* and available for building circuits through.
|
|
*/
|
|
*/
|