i was wrong about one of my invariants

now it's commented
this should fix asserts when you try an intro point, get a nack,
and try a second one and it works.


svn:r1637
This commit is contained in:
Roger Dingledine 2004-04-16 08:21:35 +00:00
parent 598d8b8f79
commit 9c1470840f
3 changed files with 5 additions and 2 deletions

View File

@ -480,6 +480,10 @@ void circuit_expire_building(time_t now) {
/* c_rend_ready circs measure age since timestamp_dirty, /* c_rend_ready circs measure age since timestamp_dirty,
* because that's set when they switch purposes * because that's set when they switch purposes
*/ */
/* rend and intro circs become dirty each time they
* make an introduction attempt. so timestamp_dirty
* will reflect the time since the last attempt.
*/
((victim->purpose == CIRCUIT_PURPOSE_C_REND_READY || ((victim->purpose == CIRCUIT_PURPOSE_C_REND_READY ||
victim->purpose == CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED || victim->purpose == CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED ||
victim->purpose == CIRCUIT_PURPOSE_C_INTRODUCE_ACK_WAIT) && victim->purpose == CIRCUIT_PURPOSE_C_INTRODUCE_ACK_WAIT) &&

View File

@ -948,9 +948,7 @@ int connection_ap_handshake_attach_circuit(connection_t *conn) {
if(rend_client_send_introduction(introcirc, rendcirc) < 0) { if(rend_client_send_introduction(introcirc, rendcirc) < 0) {
return -1; return -1;
} }
assert(!rendcirc->timestamp_dirty);
rendcirc->timestamp_dirty = time(NULL); rendcirc->timestamp_dirty = time(NULL);
assert(!introcirc->timestamp_dirty);
introcirc->timestamp_dirty = time(NULL); introcirc->timestamp_dirty = time(NULL);
return 0; return 0;
} }

View File

@ -166,6 +166,7 @@ rend_client_introduction_acked(circuit_t *circ,
/* Locate the rend circ which is waiting to hear about this ack, /* Locate the rend circ which is waiting to hear about this ack,
* and tell it. * and tell it.
*/ */
log_fn(LOG_INFO,"Received ack. Telling rend circ.");
rendcirc = circuit_get_by_rend_query_and_purpose( rendcirc = circuit_get_by_rend_query_and_purpose(
circ->rend_query, CIRCUIT_PURPOSE_C_REND_READY); circ->rend_query, CIRCUIT_PURPOSE_C_REND_READY);
if(rendcirc) { /* remember the ack */ if(rendcirc) { /* remember the ack */