From 875756b599abb3bf5d888f67a32433d85a46b335 Mon Sep 17 00:00:00 2001 From: Ovidiu Sas Date: Mon, 27 Apr 2026 12:12:59 -0400 Subject: [PATCH 1/2] dialog: enhance debug logs - adding dlg state and dlg flags to sh_log --- modules/dialog/dlg_hash.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/dialog/dlg_hash.h b/modules/dialog/dlg_hash.h index eff88763bf2..7b6c77ed8b6 100644 --- a/modules/dialog/dlg_hash.h +++ b/modules/dialog/dlg_hash.h @@ -302,11 +302,11 @@ void destroy_dlg(struct dlg_cell *dlg); #ifdef DBG_DIALOG #define DBG_REF(dlg, cnt) \ - sh_log((dlg)->hist, DLG_REF, "h=%d, ref %d with +%d", \ - (dlg)->h_entry, (dlg)->ref, (cnt)); + sh_log((dlg)->hist, DLG_REF, "h=%d, state=%d, flags=0x%x, ref %d with +%d", \ + (dlg)->h_entry, (dlg)->state, (dlg)->flags, (dlg)->ref, (cnt)); #define DBG_UNREF(dlg, cnt) \ - sh_log((dlg)->hist, DLG_UNREF, "h=%d, unref %d with -%d", \ - (dlg)->h_entry, (dlg)->ref, (cnt)); + sh_log((dlg)->hist, DLG_UNREF, "h=%d, state=%d, flags=0x%x, unref %d with -%d", \ + (dlg)->h_entry, (dlg)->state, (dlg)->flags, (dlg)->ref, (cnt)); #define DBG_FLUSH(dlg) sh_flush((dlg)->hist) #else #define DBG_REF(dlg, cnt) From 602b44558823b74240c14128b20d0a3ead1650b7 Mon Sep 17 00:00:00 2001 From: Ovidiu Sas Date: Mon, 27 Apr 2026 12:15:57 -0400 Subject: [PATCH 2/2] lib/dbg: increase the size of the sh_log --- lib/dbg/struct_hist.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dbg/struct_hist.h b/lib/dbg/struct_hist.h index 109893c636b..2111889bbc5 100644 --- a/lib/dbg/struct_hist.h +++ b/lib/dbg/struct_hist.h @@ -49,7 +49,7 @@ * remain available inside the global history list for a while */ -#define MAX_SHLOG_SIZE 80 /* longer log lines will get truncated */ +#define MAX_SHLOG_SIZE 128 /* longer log lines will get truncated */ /** * To be freely extended by any piece of OpenSIPS code which makes use of