aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitbuild.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-08-17 12:10:31 -0400
committerNick Mathewson <nickm@torproject.org>2012-08-17 12:10:31 -0400
commita74d4182f106b1b89367cf1a640b1140d3d35d2c (patch)
treef3c98439080c306ed664f29090b89f274ddf084c /src/or/circuitbuild.c
parent3621f30ad44973acef1ae0dc2e723fd8c9f1dc0d (diff)
downloadtor-a74d4182f106b1b89367cf1a640b1140d3d35d2c.tar
tor-a74d4182f106b1b89367cf1a640b1140d3d35d2c.tar.gz
Whitespace and build fixes on 6475 patch
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r--src/or/circuitbuild.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 2fa3dd594..39a223b2f 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) {