diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-06-15 16:10:59 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-06-15 16:10:59 -0400 |
commit | bdfb399867e697e1afcbe0927a7aba685a587b1c (patch) | |
tree | 47acc532ecd121187168c11f4e2dc3490022f50f /src/or/relay.c | |
parent | 879b1e10101f4eb5ecfb37c7a51f2882c2ac3ea1 (diff) | |
parent | cc21e56ed4cfc9c83b2cbfef9a8ff088471f7925 (diff) | |
download | tor-bdfb399867e697e1afcbe0927a7aba685a587b1c.tar tor-bdfb399867e697e1afcbe0927a7aba685a587b1c.tar.gz |
Merge remote-tracking branch 'public/xxx023'
Diffstat (limited to 'src/or/relay.c')
-rw-r--r-- | src/or/relay.c | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/src/or/relay.c b/src/or/relay.c index 0c99c3497..3f894bfe1 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -52,11 +52,6 @@ static int circuit_consider_stop_edge_reading(circuit_t *circ, crypt_path_t *layer_hint); static int circuit_queue_streams_are_blocked(circuit_t *circ); -/* XXXX023 move this all to compat_libevent */ -/** Cache the current hi-res time; the cache gets reset when libevent - * calls us. */ -static struct timeval cached_time_hires = {0, 0}; - /** Stop reading on edge connections when we have this many cells * waiting on the appropriate queue. */ #define CELL_QUEUE_HIGHWATER_SIZE 256 @@ -64,24 +59,6 @@ static struct timeval cached_time_hires = {0, 0}; * cells. */ #define CELL_QUEUE_LOWWATER_SIZE 64 -/** Return a fairly recent view of the current time. */ -static void -tor_gettimeofday_cached(struct timeval *tv) -{ - if (cached_time_hires.tv_sec == 0) { - tor_gettimeofday(&cached_time_hires); - } - *tv = cached_time_hires; -} - -/** Reset the cached view of the current time, so that the next time we try - * to learn it, we will get an up-to-date value. */ -void -tor_gettimeofday_cache_clear(void) -{ - cached_time_hires.tv_sec = 0; -} - /** Stats: how many relay cells have originated at this hop, or have * been relayed onward (not recognized at this hop)? */ @@ -799,7 +776,7 @@ connection_ap_process_end_not_open( /* We haven't retried too many times; reattach the connection. */ circuit_log_path(LOG_INFO,LD_APP,circ); /* Mark this circuit "unusable for new streams". */ - /* XXXX023 this is a kludgy way to do this. */ + /* XXXX024 this is a kludgy way to do this. */ tor_assert(circ->_base.timestamp_dirty); circ->_base.timestamp_dirty -= get_options()->MaxCircuitDirtiness; @@ -1462,7 +1439,7 @@ connection_edge_package_raw_inbuf(edge_connection_t *conn, int package_partial, stats_n_data_cells_packaged += 1; if (PREDICT_UNLIKELY(sending_from_optimistic)) { - /* XXX023 We could be more efficient here by sometimes packing + /* XXXX We could be more efficient here by sometimes packing * previously-sent optimistic data in the same cell with data * from the inbuf. */ generic_buffer_get(entry_conn->sending_optimistic_data, payload, length); |