From 54a09dfe0f285343d89e52f56cc7372c1b40faf0 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Tue, 4 Feb 2025 08:21:06 +0100 Subject: [PATCH] BUG/MINOR: tevt/mux-h2: Set truncated receive/eos events at SE level on error When receive or EOS termination events are reported at the SE level, a truncation was erroneously reported when no error was detected. Of course, it must be the opposite. No backport needed. --- src/mux_h2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mux_h2.c b/src/mux_h2.c index 0dab728fb..6070c2e09 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -1828,10 +1828,10 @@ static inline void h2s_propagate_term_flags(struct h2c *h2c, struct h2s *h2s) se_fl_set(h2s->sd, SE_FL_EOS); if (!se_fl_test(h2s->sd, SE_FL_EOI)) { se_fl_set(h2s->sd, SE_FL_ERROR); - se_report_term_evt(h2s->sd, (h2c->flags & H2_CF_ERROR ? se_tevt_type_rcv_err : se_tevt_type_eos)); + se_report_term_evt(h2s->sd, (h2c->flags & H2_CF_ERROR ? se_tevt_type_truncated_rcv_err : se_tevt_type_truncated_eos)); } else - se_report_term_evt(h2s->sd, (h2c->flags & H2_CF_ERROR ? se_tevt_type_truncated_rcv_err : se_tevt_type_truncated_eos)); + se_report_term_evt(h2s->sd, (h2c->flags & H2_CF_ERROR ? se_tevt_type_rcv_err : se_tevt_type_eos)); } if (se_fl_test(h2s->sd, SE_FL_ERR_PENDING)) se_fl_set(h2s->sd, SE_FL_ERROR);