From: Nick Mathewson Date: Sun, 6 Jul 2008 18:34:45 +0000 (+0000) Subject: Apply fix from chrisw: call connection_ap_attach_pending when we get a rendezvous2... X-Git-Tag: tor-0.2.1.3-alpha~71 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=615c64efb851d8272069701c1bee3ef2bdca3e81;p=thirdparty%2Ftor.git Apply fix from chrisw: call connection_ap_attach_pending when we get a rendezvous2 or rendezvous_established call. This is a bit brute-foce, but it is better than we had before, and might not even show up on profiles. Backport candidate, once tested. svn:r15699 --- diff --git a/ChangeLog b/ChangeLog index 59320bbb54..26523a4065 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,12 @@ Changes in version 0.2.1.3-alpha - 2008-07-xx - Send a bootstrap problem "warn" event on the first problem if the reason is NO_ROUTE (that is, our network is down). + o Major bugfixes: + - Try to attach connections immediately upon receiving a RENDEZVOUS2 or + RENDEZVOUS_ESTABLISHED cell. This can save a second or two on the + client size when connecting to a hidden service. Bugfix on 0.0.6pre1. + Found and fixed by Christian Wilms; resolves butg 743. + o Minor bugfixes: - Change the contrib/tor.logrotate script so it makes the new logs as "_tor:_tor" rather than the default, which is generally diff --git a/src/or/rendclient.c b/src/or/rendclient.c index b5eed4bca8..91bb36bb2c 100644 --- a/src/or/rendclient.c +++ b/src/or/rendclient.c @@ -543,6 +543,12 @@ rend_client_rendezvous_acked(origin_circuit_t *circ, const char *request, log_info(LD_REND,"Got rendezvous ack. This circuit is now ready for " "rendezvous."); circ->_base.purpose = CIRCUIT_PURPOSE_C_REND_READY; + /*XXXX021 This is a pretty brute approach. It'd be better to + * attach only the connections that are waiting on this circuit, rather + * than trying to attach them all. */ + /* If we already have the introduction circuit, built make sure we send + * the INTRODUCE cell _now_ */ + connection_ap_attach_pending(); return 0; } @@ -605,6 +611,11 @@ rend_client_receive_rendezvous(origin_circuit_t *circ, const char *request, onion_append_to_cpath(&circ->cpath, hop); circ->build_state->pending_final_cpath = NULL; /* prevent double-free */ + /*XXXX021 This is a pretty brute approach. It'd be better to + * attach only the connections that are waiting on this circuit, rather + * than trying to attach them all. */ + /* */ + connection_ap_attach_pending(); return 0; err: circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_TORPROTOCOL);