[tor-commits] [tor/maint-0.2.3] Whitespace and build fixes on 6475 patch
nickm at torproject.org
nickm at torproject.org
Fri Aug 17 16:10:38 UTC 2012
commit a74d4182f106b1b89367cf1a640b1140d3d35d2c
Author: Nick Mathewson <nickm at torproject.org>
Date: Fri Aug 17 12:10:31 2012 -0400
Whitespace and build fixes on 6475 patch
---
src/or/circuitbuild.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 2fa3dd5..39a223b 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -2609,14 +2609,14 @@ pathbias_get_scale_factor(const or_options_t *options)
DFLT_PATH_BIAS_SCALE_THRESHOLD, 1, INT32_MAX);
}
-const char *
+static const char *
pathbias_state_to_string(path_state_t state)
{
- switch(state) {
+ switch (state) {
case PATH_STATE_NEW_CIRC:
- return "new";
+ return "new";
case PATH_STATE_DID_FIRST_HOP:
- return "first hop";
+ return "first hop";
case PATH_STATE_SUCCEEDED:
return "succeeded";
}
@@ -2624,7 +2624,6 @@ pathbias_state_to_string(path_state_t state)
return "unknown";
}
-
/**
* Check our circuit state to see if this is a successful first hop.
* If so, record it in the current guard's path bias first_hop count.
@@ -2635,7 +2634,8 @@ static int
pathbias_count_first_hop(origin_circuit_t *circ)
{
#define FIRST_HOP_NOTICE_INTERVAL (600)
- static ratelim_t first_hop_notice_limit = RATELIM_INIT(FIRST_HOP_NOTICE_INTERVAL);
+ static ratelim_t first_hop_notice_limit =
+ RATELIM_INIT(FIRST_HOP_NOTICE_INTERVAL);
char *rate_msg = NULL;
/* Completely ignore one hop circuits */
@@ -2706,7 +2706,7 @@ pathbias_count_first_hop(origin_circuit_t *circ)
"A %s circuit is in cpath state %d (opened: %d). "
"Circuit is a %s currently %s. %s",
pathbias_state_to_string(circ->path_state),
- circ->cpath->state, circ->has_opened,
+ circ->cpath->state, circ->has_opened,
circuit_purpose_to_string(circ->_base.purpose),
circuit_state_to_string(circ->_base.state),
rate_msg);
@@ -2728,7 +2728,8 @@ static void
pathbias_count_success(origin_circuit_t *circ)
{
#define SUCCESS_NOTICE_INTERVAL (600)
- static ratelim_t success_notice_limit = RATELIM_INIT(SUCCESS_NOTICE_INTERVAL);
+ static ratelim_t success_notice_limit =
+ RATELIM_INIT(SUCCESS_NOTICE_INTERVAL);
char *rate_msg = NULL;
/* Ignore one hop circuits */
@@ -2796,7 +2797,6 @@ pathbias_count_success(origin_circuit_t *circ)
}
}
-
/** Increment the number of times we successfully extended a circuit to
* 'guard', first checking if the failure rate is high enough that we should
* eliminate the guard. Return -1 if the guard looks no good; return 0 if the
@@ -2866,7 +2866,7 @@ circuit_finish_handshake(origin_circuit_t *circ, uint8_t reply_type,
crypt_path_t *hop;
int rv;
- if((rv = pathbias_count_first_hop(circ)) < 0)
+ if ((rv = pathbias_count_first_hop(circ)) < 0)
return rv;
if (circ->cpath->state == CPATH_STATE_AWAITING_KEYS) {
More information about the tor-commits
mailing list