aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/circuituse.c
diff options
context:
space:
mode:
authorrl1987 <rl1987@sdf.lonestar.org>2019-03-05 17:58:31 +0200
committerNick Mathewson <nickm@torproject.org>2019-03-29 14:25:59 -0400
commita959d7cb98ed0e5b6e2fabf36301accd28f0641c (patch)
treeffc500161fdebd187fac88694832386e6e61470c /src/core/or/circuituse.c
parentf66a17444e4a83e548985784956f321e9e1e1ab2 (diff)
downloadtor-a959d7cb98ed0e5b6e2fabf36301accd28f0641c.tar.gz
tor-a959d7cb98ed0e5b6e2fabf36301accd28f0641c.zip
Use tor_assertf{_nonfatal} in code
Diffstat (limited to 'src/core/or/circuituse.c')
-rw-r--r--src/core/or/circuituse.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/or/circuituse.c b/src/core/or/circuituse.c
index 2fdf6f7e8c..f77decf530 100644
--- a/src/core/or/circuituse.c
+++ b/src/core/or/circuituse.c
@@ -3117,7 +3117,9 @@ circuit_sent_valid_data(origin_circuit_t *circ, uint16_t relay_body_len)
{
if (!circ) return;
- tor_assert_nonfatal(relay_body_len <= RELAY_PAYLOAD_SIZE);
+ tor_assertf_nonfatal(relay_body_len <= RELAY_PAYLOAD_SIZE,
+ "Wrong relay_body_len: %d (should be at most %d)",
+ relay_body_len, RELAY_PAYLOAD_SIZE);
circ->n_delivered_written_circ_bw =
tor_add_u32_nowrap(circ->n_delivered_written_circ_bw, relay_body_len);