[or-cvs] r15699: Apply fix from chrisw: call connection_ap_attach_pending whe (in tor/trunk: . src/or)
nickm at seul.org
nickm at seul.org
Sun Jul 6 18:34:45 UTC 2008
Author: nickm
Date: 2008-07-06 14:34:45 -0400 (Sun, 06 Jul 2008)
New Revision: 15699
Modified:
tor/trunk/ChangeLog
tor/trunk/src/or/rendclient.c
Log:
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.
Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog 2008-07-06 18:33:35 UTC (rev 15698)
+++ tor/trunk/ChangeLog 2008-07-06 18:34:45 UTC (rev 15699)
@@ -3,6 +3,12 @@
- 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
Modified: tor/trunk/src/or/rendclient.c
===================================================================
--- tor/trunk/src/or/rendclient.c 2008-07-06 18:33:35 UTC (rev 15698)
+++ tor/trunk/src/or/rendclient.c 2008-07-06 18:34:45 UTC (rev 15699)
@@ -543,6 +543,12 @@
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 @@
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);
More information about the tor-commits
mailing list