summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-04-19 16:39:29 -0400
committerNick Mathewson <nickm@torproject.org>2010-04-19 16:39:29 -0400
commite3cd535c7cfa56b6feb923188c7c8195c72daa28 (patch)
tree0f0ca377a3baa5268c33939050a321c88a1f59ac
parentaf9dd4af02f2cfec3e5d71f310e310f41560ee0b (diff)
downloadtor-e3cd535c7cfa56b6feb923188c7c8195c72daa28.tar.gz
tor-e3cd535c7cfa56b6feb923188c7c8195c72daa28.zip
Move the declaration of bandwidth_rate_rule_to_string
It's natural for the definition of bandwidth_rule_t to be with the functions that actually care about its values. Unfortunately, this means declaring bandwidth_rate_rule_to_string() out of sequence. Someday we'll just rename reasons.c to strings.c, and put it at the end of or.h, and this will all be better.
-rw-r--r--changes/move_bwrts_declaration2
-rw-r--r--src/or/or.h6
2 files changed, 5 insertions, 3 deletions
diff --git a/changes/move_bwrts_declaration b/changes/move_bwrts_declaration
new file mode 100644
index 0000000000..8ba2bb347e
--- /dev/null
+++ b/changes/move_bwrts_declaration
@@ -0,0 +1,2 @@
+ o Minor bugfixes:
+ - Fix a compilation warning in or.h related to bandwidth_weight_rule_t
diff --git a/src/or/or.h b/src/or/or.h
index 7c1e5a7a09..a205b77620 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -4493,9 +4493,6 @@ const char *circuit_end_reason_to_control_string(int reason);
const char *socks4_response_code_to_string(uint8_t code);
const char *socks5_response_code_to_string(uint8_t code);
-enum bandwidth_weight_rule_t;
-const char *bandwidth_weight_rule_to_string(enum bandwidth_weight_rule_t rule);
-
/********************************* relay.c ***************************/
extern uint64_t stats_n_relay_cells_relayed;
@@ -4975,6 +4972,9 @@ routerinfo_t *routerlist_sl_choose_by_bandwidth(smartlist_t *sl,
routerstatus_t *routerstatus_sl_choose_by_bandwidth(smartlist_t *sl,
bandwidth_weight_rule_t rule);
+/* XXXX actually declared in reasons.c */
+const char *bandwidth_weight_rule_to_string(enum bandwidth_weight_rule_t rule);
+
/** Flags to be passed to control router_choose_random_node() to indicate what
* kind of nodes to pick according to what algorithm. */
typedef enum {