aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-07-07 11:14:47 -0400
committerNick Mathewson <nickm@torproject.org>2017-07-07 11:14:47 -0400
commitec3e0469864ebb11fd7af3150e748f8082d57d13 (patch)
tree97c435663a989ff353a1d2ab9b55e751e50bafc5 /src
parentf35f52e8697407dde391ebc4f1be6ba76e1a1bb2 (diff)
downloadtor-ec3e0469864ebb11fd7af3150e748f8082d57d13.tar.gz
tor-ec3e0469864ebb11fd7af3150e748f8082d57d13.zip
Use LD_BUG, not LOG_PROTOCOL_WARN, for bad-purpose cases.
Diffstat (limited to 'src')
-rw-r--r--src/or/hs_circuit.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/or/hs_circuit.c b/src/or/hs_circuit.c
index f2ea8f5538..2f595d72e5 100644
--- a/src/or/hs_circuit.c
+++ b/src/or/hs_circuit.c
@@ -19,12 +19,13 @@
* <b>circ_purpose</b> and ensure that it's properly set. Return true iff
* circuit purpose is properly set, otherwise return false. */
static int
-circuit_purpose_is_correct_for_rend(unsigned int circ_purpose, int is_service_side)
+circuit_purpose_is_correct_for_rend(unsigned int circ_purpose,
+ int is_service_side)
{
if (is_service_side) {
if (circ_purpose != CIRCUIT_PURPOSE_S_CONNECT_REND) {
- log_fn(LOG_PROTOCOL_WARN, LD_GENERAL,
- "HS e2e circuit setup with wrong purpose(%d)", circ_purpose);
+ log_warn(LD_BUG,
+ "HS e2e circuit setup with wrong purpose (%d)", circ_purpose);
return 0;
}
}
@@ -32,8 +33,8 @@ circuit_purpose_is_correct_for_rend(unsigned int circ_purpose, int is_service_si
if (!is_service_side) {
if (circ_purpose != CIRCUIT_PURPOSE_C_REND_READY &&
circ_purpose != CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED) {
- log_fn(LOG_PROTOCOL_WARN, LD_GENERAL,
- "Client e2e circuit setup with wrong purpose(%d)", circ_purpose);
+ log_warn(LD_BUG,
+ "Client e2e circuit setup with wrong purpose (%d)", circ_purpose);
return 0;
}
}