From 12330e2b0bffd4db948266494a8d1aa0844b1ac7 Mon Sep 17 00:00:00 2001 From: Alessio Garzi Date: Fri, 5 Sep 2025 15:24:16 +0200 Subject: [PATCH] MT#63374 Do not print errors in w_dlg_get_var if destination is a dlg_var This commit removes error loglines into kamailio log file in case dlg_get_var() receives a dlg_var() as fifth variable or more in general when PVT_OTHER is selected (which is not avp or var). vars -> id 15 avps -> id 4 xavps -> 17 Change-Id: I727ae5aea12e88b71f73a5e0bb3223fe68e535dc --- debian/patches/series | 1 + .../dlg_get_var_error_more_verbose_on_dlg | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 debian/patches/sipwise/dlg_get_var_error_more_verbose_on_dlg diff --git a/debian/patches/series b/debian/patches/series index e883a9aa5..d86ada50f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -44,6 +44,7 @@ sipwise/usrloc-don-t-synchronize-on-destroy-for-DB_ONLY.patch sipwise/presence_offline_cleanup.patch ### active development sipwise/permissions-don-t-allow-reloads-in-the-middle-of-ong.patch +sipwise/dlg_get_var_error_more_verbose_on_dlg ### Don't just put stuff in any order ### use gbp pq import/export tooling to help maintain patches ### diff --git a/debian/patches/sipwise/dlg_get_var_error_more_verbose_on_dlg b/debian/patches/sipwise/dlg_get_var_error_more_verbose_on_dlg new file mode 100644 index 000000000..00574740c --- /dev/null +++ b/debian/patches/sipwise/dlg_get_var_error_more_verbose_on_dlg @@ -0,0 +1,22 @@ +--- a/src/modules/dialog/dialog.c ++++ b/src/modules/dialog/dialog.c +@@ -1955,7 +1955,8 @@ static int w_dlg_get_var( + pv_get_null(msg, NULL, &dst_val); + } + if(pv_set_spec_value(msg, dst_pv, 0, &dst_val) != 0) { +- LM_ERR("unable to set value to dst_pv\n"); ++ if (dst_pv && dst_pv->type != PVT_OTHER) ++ LM_ERR("unable to set value to dst_pv\n"); + if(val) + goto error; + else +@@ -1966,7 +1967,8 @@ static int w_dlg_get_var( + error: + pv_get_null(msg, NULL, &dst_val); + if(pv_set_spec_value(msg, dst_pv, 0, &dst_val) != 0) { +- LM_ERR("unable to set null value to dst_pv\n"); ++ if (dst_pv && dst_pv->type != PVT_OTHER) ++ LM_ERR("unable to set null value to dst_pv\n"); + } + return -1; + }