Module: kamailio
Branch: master
Commit: 7c365f76560b18aca49096121ea55791ce8f3623
URL:
https://github.com/kamailio/kamailio/commit/7c365f76560b18aca49096121ea5579…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2024-12-14T13:44:13+01:00
ims_diameter_server: fix retrieval ``$diameter_response`` value
``current_msg_id_repl is only`` changed if ``$diameter_reponse``
is changed by via ``pv_set_response()``. The event_route is
executed with a ``fake_msg`` so it will not match if is setted
outside anyways.
---
Modified: src/modules/ims_diameter_server/avp_helper.c
---
Diff:
https://github.com/kamailio/kamailio/commit/7c365f76560b18aca49096121ea5579…
Patch:
https://github.com/kamailio/kamailio/commit/7c365f76560b18aca49096121ea5579…
---
diff --git a/src/modules/ims_diameter_server/avp_helper.c
b/src/modules/ims_diameter_server/avp_helper.c
index 065a58c364d..7fa2ac66ce2 100644
--- a/src/modules/ims_diameter_server/avp_helper.c
+++ b/src/modules/ims_diameter_server/avp_helper.c
@@ -48,7 +48,6 @@
// ID of current message
static unsigned int current_msg_id = 0;
-static unsigned int current_msg_id_repl = 0;
cJSON *avp2json(AAA_AVP *avp_t)
{
@@ -488,7 +487,7 @@ int pv_get_application(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res)
int pv_get_response(struct sip_msg *msg, pv_param_t *param, pv_value_t *res)
{
- if((msg->id != current_msg_id_repl) || (responsejson.len < 0)) {
+ if(responsejson.len < 0) {
return pv_get_null(msg, param, res);
}
return pv_get_strval(msg, param, res, &responsejson);
@@ -504,7 +503,6 @@ int pv_set_response(
val->rs.s);
responsejson.s = val->rs.s;
responsejson.len = val->rs.len;
- current_msg_id_repl = msg->id;
return 0;
}
return 0;