diff options
author | Nick Mathewson <nickm@torproject.org> | 2003-11-11 02:41:31 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2003-11-11 02:41:31 +0000 |
commit | dafb0e6a6eddc8b0fbf6de4292d49a311b2e712a (patch) | |
tree | 4960fd86da6eaff71d83c2c9a5e00f87ba33d0a4 /src/or/circuit.c | |
parent | 894b1bc5d05ba263874d4b24caca44d2b6a2ae38 (diff) | |
download | tor-dafb0e6a6eddc8b0fbf6de4292d49a311b2e712a.tar.gz tor-dafb0e6a6eddc8b0fbf6de4292d49a311b2e712a.zip |
Make AP connections wait for a circuit if none exists.
Also:
- Refactor socks request into a separate struct
- Add a separate 'waiting for circuit' state to AP connections
between 'waiting for socks' and 'open'.
Arma: can you check out the XXX's I've added to connection_edge? I may
be mishandling some async and close logic.
svn:r783
Diffstat (limited to 'src/or/circuit.c')
-rw-r--r-- | src/or/circuit.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/circuit.c b/src/or/circuit.c index 18597fd4de..49dbdb00b6 100644 --- a/src/or/circuit.c +++ b/src/or/circuit.c @@ -755,6 +755,9 @@ int circuit_send_next_onion_skin(circuit_t *circ) { if(hop == circ->cpath) { /* done building the circuit. whew. */ circ->state = CIRCUIT_STATE_OPEN; log_fn(LOG_INFO,"circuit built!"); + /* Tell any AP connections that have been waiting for a new + * circuit that one is ready. */ + connection_ap_attach_pending(); return 0; } |