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
pull/12/head
Alessio Garzi 8 months ago
parent d4dcc44416
commit 12330e2b0b

@ -44,6 +44,7 @@ sipwise/usrloc-don-t-synchronize-on-destroy-for-DB_ONLY.patch
sipwise/presence_offline_cleanup.patch sipwise/presence_offline_cleanup.patch
### active development ### active development
sipwise/permissions-don-t-allow-reloads-in-the-middle-of-ong.patch 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 ### Don't just put stuff in any order
### use gbp pq import/export tooling to help maintain patches ### use gbp pq import/export tooling to help maintain patches
### ###

@ -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;
}
Loading…
Cancel
Save