[or-cvs] add a TODO item and some comment changes.
Nick Mathewson
nickm at seul.org
Tue Nov 16 03:32:04 UTC 2004
Update of /home/or/cvsroot/tor/src/or
In directory moria.mit.edu:/tmp/cvs-serv14910/src/or
Modified Files:
circuitbuild.c hibernate.c
Log Message:
add a TODO item and some comment changes.
Index: circuitbuild.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/circuitbuild.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- circuitbuild.c 12 Nov 2004 16:39:02 -0000 1.57
+++ circuitbuild.c 16 Nov 2004 03:32:01 -0000 1.58
@@ -422,8 +422,7 @@
if(!has_completed_circuit) {
has_completed_circuit=1;
log_fn(LOG_NOTICE,"Tor has successfully opened a circuit. Looks like it's working.");
- /* XXX009 put a count of known routers here */
- /* XXXX "Put?" Do you mean log, or something else? -NM */
+ /* XXX009 Log a count of known routers here */
}
circuit_rep_hist_note_result(circ);
circuit_has_opened(circ); /* do other actions as necessary */
Index: hibernate.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/hibernate.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- hibernate.c 15 Nov 2004 04:01:31 -0000 1.21
+++ hibernate.c 16 Nov 2004 03:32:01 -0000 1.22
@@ -206,12 +206,14 @@
{
uint64_t used;
uint32_t max_configured = (get_options()->BandwidthRateBytes * 60);
- /* XXX max_configured will be false if it exceeds
- * get_options()->AccountingMaxKB*1000, right? -RD
- * XXX Huh? Why? How? -NM
- */
if (n_seconds_active_in_interval < 1800) {
+ /* If we haven't gotten enough data last interval, guess that
+ * we'll be used at our maximum capacity. This is unlikely to be
+ * so, but it will give us an okay first estimate, and we'll stay
+ * up until we send MaxKB kilobytes. Next interval, we'll choose
+ * our starting time based on how much we sent this interval.
+ */
expected_bandwidth_usage = max_configured;
} else {
used = n_bytes_written_in_interval < n_bytes_read_in_interval ?
More information about the tor-commits
mailing list