summaryrefslogtreecommitdiff
path: root/src/or/circuitlist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-01-13 21:48:33 -0500
committerNick Mathewson <nickm@torproject.org>2013-01-13 21:48:33 -0500
commitd357b97b6d7dcd98229218549245fcc3fcbee8f7 (patch)
treefac95710e5c3f9eef2920143dd5b85227725b30c /src/or/circuitlist.c
parentdab25eb37dd7d5245a03a5380ba5f80c64e4ac3d (diff)
parentd05ff310a5547b15433314617d6f1b9e9ccfe5b8 (diff)
downloadtor-d357b97b6d7dcd98229218549245fcc3fcbee8f7.tar.gz
tor-d357b97b6d7dcd98229218549245fcc3fcbee8f7.zip
Merge remote-tracking branch 'mikeperry/bug7691-rebased'
Diffstat (limited to 'src/or/circuitlist.c')
-rw-r--r--src/or/circuitlist.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c
index 1a7306292f..90719d2b63 100644
--- a/src/or/circuitlist.c
+++ b/src/or/circuitlist.c
@@ -414,6 +414,8 @@ circuit_purpose_to_controller_string(uint8_t purpose)
return "MEASURE_TIMEOUT";
case CIRCUIT_PURPOSE_CONTROLLER:
return "CONTROLLER";
+ case CIRCUIT_PURPOSE_PATH_BIAS_TESTING:
+ return "PATH_BIAS_TESTING";
default:
tor_snprintf(buf, sizeof(buf), "UNKNOWN_%d", (int)purpose);
@@ -441,6 +443,7 @@ circuit_purpose_to_controller_hs_state_string(uint8_t purpose)
case CIRCUIT_PURPOSE_C_MEASURE_TIMEOUT:
case CIRCUIT_PURPOSE_TESTING:
case CIRCUIT_PURPOSE_CONTROLLER:
+ case CIRCUIT_PURPOSE_PATH_BIAS_TESTING:
return NULL;
case CIRCUIT_PURPOSE_INTRO_POINT:
@@ -1356,7 +1359,10 @@ circuit_mark_for_close_(circuit_t *circ, int reason, int line,
}
if (CIRCUIT_IS_ORIGIN(circ)) {
- pathbias_check_close(TO_ORIGIN_CIRCUIT(circ), reason);
+ if (pathbias_check_close(TO_ORIGIN_CIRCUIT(circ), reason) == -1) {
+ /* Don't close it yet, we need to test it first */
+ return;
+ }
/* We don't send reasons when closing circuits at the origin. */
reason = END_CIRC_REASON_NONE;