From c24710ac03723755eb3bc313cf2a9084b5add372 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Ondr=C3=A1=C4=8Dek?= Date: Wed, 27 Nov 2024 16:09:46 +0100 Subject: [PATCH] tmp: abort on specific assert --- daemon/defer.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/daemon/defer.h b/daemon/defer.h index 20e4ac92b..15fe86b75 100644 --- a/daemon/defer.h +++ b/daemon/defer.h @@ -50,7 +50,12 @@ static inline void defer_sample_addr(const union kr_sockaddr *addr, bool stream) if (defer_sample_state.addr.ip.sa_family != AF_UNSPEC) { // TODO: this costs performance, so only in some debug mode? - kr_assert(kr_sockaddr_cmp(&addr->ip, &defer_sample_state.addr.ip) == kr_ok()); + if (kr_fails_assert(kr_sockaddr_cmp(&addr->ip, &defer_sample_state.addr.ip) == kr_ok())) { + kr_log_error(DEFER, "%s != %s\n", + kr_straddr(&addr->ip), + kr_straddr(&defer_sample_state.addr.ip)); + abort(); + } return; }