summaryrefslogtreecommitdiff
path: root/src/or/rendclient.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-05-30 12:33:54 -0400
committerNick Mathewson <nickm@torproject.org>2011-05-30 12:33:54 -0400
commit4b57ec6e5eabb822506416bc5cf0e291ff9c0053 (patch)
tree2c1621d0f477f1929a94faa74d5ad1401fc6c519 /src/or/rendclient.c
parent6917728637bdbaed86d48d394eab6a063c319269 (diff)
parent16cfca501ff27dd11daa9dc75ba9f5d99c48bdf5 (diff)
downloadtor-4b57ec6e5eabb822506416bc5cf0e291ff9c0053.tar.gz
tor-4b57ec6e5eabb822506416bc5cf0e291ff9c0053.zip
Merge remote-tracking branch 'origin/maint-0.2.2'
Conflicts: src/or/circuituse.c
Diffstat (limited to 'src/or/rendclient.c')
-rw-r--r--src/or/rendclient.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/or/rendclient.c b/src/or/rendclient.c
index 3a2aaf1c41..d135dc53f6 100644
--- a/src/or/rendclient.c
+++ b/src/or/rendclient.c
@@ -276,6 +276,10 @@ rend_client_send_introduction(origin_circuit_t *introcirc,
/* Now, we wait for an ACK or NAK on this circuit. */
introcirc->_base.purpose = CIRCUIT_PURPOSE_C_INTRODUCE_ACK_WAIT;
+ /* Set timestamp_dirty, because circuit_expire_building expects it
+ * to specify when a circuit entered the _C_INTRODUCE_ACK_WAIT
+ * state. */
+ introcirc->_base.timestamp_dirty = time(NULL);
return 0;
perm_err:
@@ -330,6 +334,10 @@ rend_client_introduction_acked(origin_circuit_t *circ,
circ->rend_data->onion_address, CIRCUIT_PURPOSE_C_REND_READY);
if (rendcirc) { /* remember the ack */
rendcirc->_base.purpose = CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED;
+ /* Set timestamp_dirty, because circuit_expire_building expects
+ * it to specify when a circuit entered the
+ * _C_REND_READY_INTRO_ACKED state. */
+ rendcirc->_base.timestamp_dirty = time(NULL);
} else {
log_info(LD_REND,"...Found no rend circ. Dropping on the floor.");
}
@@ -677,6 +685,9 @@ rend_client_rendezvous_acked(origin_circuit_t *circ, const uint8_t *request,
log_info(LD_REND,"Got rendezvous ack. This circuit is now ready for "
"rendezvous.");
circ->_base.purpose = CIRCUIT_PURPOSE_C_REND_READY;
+ /* Set timestamp_dirty, because circuit_expire_building expects it
+ * to specify when a circuit entered the _C_REND_READY state. */
+ circ->_base.timestamp_dirty = time(NULL);
/* XXXX023 This is a pretty brute-force approach. It'd be better to
* attach only the connections that are waiting on this circuit, rather
* than trying to attach them all. See comments bug 743. */