[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] i was wrong about one of my invariants
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
circuit.c connection_edge.c rendclient.c
Log Message:
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.
Index: circuit.c
===================================================================
RCS file: /home/or/cvsroot/src/or/circuit.c,v
retrieving revision 1.211
retrieving revision 1.212
diff -u -d -r1.211 -r1.212
--- circuit.c 15 Apr 2004 01:08:59 -0000 1.211
+++ circuit.c 16 Apr 2004 08:21:35 -0000 1.212
@@ -480,6 +480,10 @@
/* c_rend_ready circs measure age since timestamp_dirty,
* 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_INTRO_ACKED ||
victim->purpose == CIRCUIT_PURPOSE_C_INTRODUCE_ACK_WAIT) &&
Index: connection_edge.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_edge.c,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -d -r1.165 -r1.166
--- connection_edge.c 15 Apr 2004 03:48:26 -0000 1.165
+++ connection_edge.c 16 Apr 2004 08:21:35 -0000 1.166
@@ -948,9 +948,7 @@
if(rend_client_send_introduction(introcirc, rendcirc) < 0) {
return -1;
}
- assert(!rendcirc->timestamp_dirty);
rendcirc->timestamp_dirty = time(NULL);
- assert(!introcirc->timestamp_dirty);
introcirc->timestamp_dirty = time(NULL);
return 0;
}
Index: rendclient.c
===================================================================
RCS file: /home/or/cvsroot/src/or/rendclient.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- rendclient.c 16 Apr 2004 04:41:07 -0000 1.39
+++ rendclient.c 16 Apr 2004 08:21:35 -0000 1.40
@@ -166,6 +166,7 @@
/* Locate the rend circ which is waiting to hear about this ack,
* and tell it.
*/
+ log_fn(LOG_INFO,"Received ack. Telling rend circ.");
rendcirc = circuit_get_by_rend_query_and_purpose(
circ->rend_query, CIRCUIT_PURPOSE_C_REND_READY);
if(rendcirc) { /* remember the ack */