diff options
author | Roger Dingledine <arma@torproject.org> | 2005-08-12 01:26:21 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2005-08-12 01:26:21 +0000 |
commit | aab541c85246f600e66be9f1db4eb2ba3319da4a (patch) | |
tree | 387bb142d514074824fe114c308a5cb48ff505fb /src/or/circuituse.c | |
parent | 2caa74e6ff7fa9da3dfb070c45164c1eb820e09e (diff) | |
download | tor-aab541c85246f600e66be9f1db4eb2ba3319da4a.tar.gz tor-aab541c85246f600e66be9f1db4eb2ba3319da4a.zip |
We weren't cannibilizing circuits correctly for
CIRCUIT_PURPOSE_C_ESTABLISH_REND and CIRCUIT_PURPOSE_S_ESTABLISH_INTRO
so we were being forced to build those from scratch.
This should save us a bit of time. Also fixes bug 173.
svn:r4763
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r-- | src/or/circuituse.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c index 2990e832d4..2fba046c38 100644 --- a/src/or/circuituse.c +++ b/src/or/circuituse.c @@ -751,13 +751,8 @@ circuit_launch_by_extend_info(uint8_t purpose, extend_info_t *info, circ->timestamp_created = time(NULL); switch (purpose) { case CIRCUIT_PURPOSE_C_ESTABLISH_REND: - /* it's ready right now */ - /* XXX should we call control_event_circuit_status() here? */ - rend_client_rendcirc_has_opened(circ); - break; case CIRCUIT_PURPOSE_S_ESTABLISH_INTRO: /* it's ready right now */ - rend_service_intro_has_opened(circ); break; case CIRCUIT_PURPOSE_C_INTRODUCING: case CIRCUIT_PURPOSE_S_CONNECT_REND: @@ -942,6 +937,9 @@ circuit_get_open_circ_or_launch(connection_t *conn, if (circ) { /* write the service_id into circ */ strlcpy(circ->rend_query, conn->rend_query, sizeof(circ->rend_query)); + if (circ->purpose == CIRCUIT_PURPOSE_C_ESTABLISH_REND && + circ->state == CIRCUIT_STATE_OPEN) + rend_client_rendcirc_has_opened(circ); } } } |