[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] infrastructure for the "change pseudonym" button.
Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or
Modified Files:
circuitlist.c or.h
Log Message:
infrastructure for the 'change pseudonym' button.
not used yet.
Index: circuitlist.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/circuitlist.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- circuitlist.c 30 Sep 2005 01:09:52 -0000 1.58
+++ circuitlist.c 5 Oct 2005 22:31:21 -0000 1.59
@@ -567,6 +567,27 @@
}
}
+/** Go through the circuitlist; for each circuit that starts at us
+ * and is dirty, frob its timestamp_dirty so we won't use it for any
+ * new streams.
+ *
+ * This is useful for letting the user change pseudonyms, so new
+ * streams will not be linkable to old streams.
+ */
+void
+circuit_expire_all_dirty_circs(void)
+{
+ circuit_t *circ;
+ or_options_t *options = get_options();
+
+ for (circ=global_circuitlist; circ; circ = circ->next) {
+ if (CIRCUIT_IS_ORIGIN(circ) &&
+ !circ->marked_for_close &&
+ circ->timestamp_dirty)
+ circ->timestamp_dirty -= options->MaxCircuitDirtiness;
+ }
+}
+
/** Mark <b>circ</b> to be closed next time we call
* circuit_close_all_marked(). Do any cleanup needed:
* - If state is onionskin_pending, remove circ from the onion_pending
Index: or.h
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/or.h,v
retrieving revision 1.706
retrieving revision 1.707
diff -u -d -r1.706 -r1.707
--- or.h 5 Oct 2005 05:03:52 -0000 1.706
+++ or.h 5 Oct 2005 22:31:21 -0000 1.707
@@ -1417,6 +1417,7 @@
circuit_t *circuit_get_clean_open(uint8_t purpose, int need_uptime,
int need_capacity, int internal);
void circuit_mark_all_unused_circs(void);
+void circuit_expire_all_dirty_circs(void);
void _circuit_mark_for_close(circuit_t *circ, int line, const char *file);
#define circuit_mark_for_close(c) \