TT#93800 cfgt: skip $T_* vars

We are getting crashes trying to get the values, let's skip them
for now.

Related: https://github.com/kamailio/kamailio/issues/2479
Change-Id: Id24f7b1db94cac52bc3be8c78219ca2d9544c533
mr9.1
Victor Seva 6 years ago
parent 7b61a35e6f
commit be803c5109

@ -40,6 +40,7 @@ sipwise/pua_dialoginfo-refresh_pubruri_avps_flag.patch
sipwise/pua_dialoginfo-local_identity_dlg_var.patch
sipwise/pua_dialoginfo-use-lock-when-use_puburi_avps-is-set.patch
sipwise/dialplan-don-t-stop-loading-rules-on-error.patch
sipwise/cfgt-skip-tm-vars-T_.patch
### active development
#
### Don't just put stuff in any order

@ -0,0 +1,24 @@
From: Victor Seva <vseva@sipwise.com>
Date: Wed, 16 Sep 2020 14:26:25 +0200
Subject: cfgt: skip tm vars $T_*
---
src/modules/cfgt/cfgt_json.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/modules/cfgt/cfgt_json.c b/src/modules/cfgt/cfgt_json.c
index b3dea63..8089c02 100644
--- a/src/modules/cfgt/cfgt_json.c
+++ b/src/modules/cfgt/cfgt_json.c
@@ -314,6 +314,11 @@ int cfgt_get_json(struct sip_msg *msg, unsigned int mask, srjson_doc_t *jdoc,
}
snprintf(iname, 128, "$xavp(%.*s)", item_name.len, item_name.s);
} else {
+ if(el->pvname.len > 3 && strncmp("$T_", el->pvname.s, 3) == 0) {
+ LM_DBG("skip tm var[%.*s]\n", el->pvname.len, el->pvname.s);
+ el = el->next;
+ continue;
+ }
if(pv_get_spec_value(msg, &el->spec, &value) != 0) {
LM_WARN("can't get value[%.*s]\n", el->pvname.len,
el->pvname.s);
Loading…
Cancel
Save