From c2f6a020a7b505e0d55748464406fb9aca062026 Mon Sep 17 00:00:00 2001 From: Sukchan Lee Date: Sun, 25 Sep 2022 09:17:23 +0900 Subject: [PATCH] [TLV] Added more debug information (#1767) --- lib/core/ogs-tlv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/core/ogs-tlv.c b/lib/core/ogs-tlv.c index 94c0c60f0..0299145b3 100644 --- a/lib/core/ogs-tlv.c +++ b/lib/core/ogs-tlv.c @@ -461,7 +461,11 @@ ogs_tlv_t *ogs_tlv_parse_block(uint32_t length, void *data, uint8_t mode) ogs_assert(pos); } - ogs_assert(length == (pos - blk)); + if (length != (pos - blk)) { + ogs_fatal("ogs_tlv_parse_block() failed[LEN:%d,MODE:%d]", length, mode); + ogs_log_hexdump(OGS_LOG_FATAL, data, length); + ogs_assert_if_reached(); + } return root; }