From 27d1675d93a07227aae3bb1d86bd4876d6c3ac77 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 16 Mar 2011 17:54:43 -0400 Subject: [PATCH 1/4] Move the decl for tor_gettimofday_cache_clear to the right header --- src/or/relay.c | 4 ++-- src/or/relay.h | 2 ++ src/or/routerparse.h | 2 -- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/or/relay.c b/src/or/relay.c index 2510242256..076b46b934 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -52,9 +52,9 @@ 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 @@ -76,7 +76,7 @@ tor_gettimeofday_cached(struct timeval *tv) void tor_gettimeofday_cache_clear(void) { - cached_time_hires.tv_sec = 0; + cached_time_hires.tv_sec = 0; } /** Stats: how many relay cells have originated at this hop, or have diff --git a/src/or/relay.h b/src/or/relay.h index dbba09239a..f64752da5d 100644 --- a/src/or/relay.h +++ b/src/or/relay.h @@ -64,5 +64,7 @@ void cell_ewma_set_scale_factor(or_options_t *options, networkstatus_t *consensus); void circuit_clear_cell_queue(circuit_t *circ, or_connection_t *orconn); +void tor_gettimeofday_cache_clear(void); + #endif diff --git a/src/or/routerparse.h b/src/or/routerparse.h index 3499f18c7c..8b8cde25f6 100644 --- a/src/or/routerparse.h +++ b/src/or/routerparse.h @@ -82,7 +82,5 @@ int rend_parse_introduction_points(rend_service_descriptor_t *parsed, size_t intro_points_encoded_size); int rend_parse_client_keys(strmap_t *parsed_clients, const char *str); -void tor_gettimeofday_cache_clear(void); - #endif From 8f9cfa0abe3793e120ee25a0f339bcee4d3fa4db Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 16 Mar 2011 18:07:42 -0400 Subject: [PATCH 2/4] Remove a useless doxygen comment --- src/or/rephist.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/or/rephist.c b/src/or/rephist.c index e4afe62b67..58e8ff0a05 100644 --- a/src/or/rephist.c +++ b/src/or/rephist.c @@ -2337,7 +2337,6 @@ typedef struct circ_buffer_stats_t { uint32_t local_circ_id; } circ_buffer_stats_t; -/** Holds stats. */ smartlist_t *circuits_for_buffer_stats = NULL; /** Remember cell statistics for circuit circ at time From 721954b3a2a55e82160815f4c133e7da66712542 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 16 Mar 2011 18:07:55 -0400 Subject: [PATCH 3/4] Resolve the one DOCDOC in the 0.2.2 code atm --- src/common/compat_libevent.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/compat_libevent.c b/src/common/compat_libevent.c index 0e5a906b74..3efc56d8d8 100644 --- a/src/common/compat_libevent.c +++ b/src/common/compat_libevent.c @@ -228,9 +228,9 @@ tor_libevent_get_method(void) #endif } -/** Return the le_version_t for the current version of libevent. If the - * version is very new, return LE_OTHER. If the version is so old that it - * doesn't support event_get_version(), return LE_OLD. DOCDOC */ +/** Return the le_version_t for the version of libevent specified in the + * string v. If the version is very new or uses an unrecognized + * version, format, return LE_OTHER. */ static le_version_t tor_decode_libevent_version(const char *v) { @@ -280,7 +280,7 @@ le_versions_compatibility(le_version_t v) } /** Return the version number of the currently running version of Libevent. - See le_version_t for info on the format. + * See le_version_t for info on the format. */ static le_version_t tor_get_libevent_version(const char **v_out) From 9dfa244484ff9c52d545daa620e034b4d03f969c Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 16 Mar 2011 18:10:15 -0400 Subject: [PATCH 4/4] Document a few more members. --- src/or/config.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/or/config.c b/src/or/config.c index d4be2072d8..5719a64088 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -4770,10 +4770,10 @@ options_save_current(void) } /** Mapping from a unit name to a multiplier for converting that unit into a - * base unit. */ + * base unit. Used by config_parse_unit. */ struct unit_table_t { - const char *unit; - uint64_t multiplier; + const char *unit; /**< The name of the unit */ + uint64_t multiplier; /**< How many of the base unit appear in this unit */ }; /** Table to map the names of memory units to the number of bytes they