Module: kamailio
Branch: master
Commit: 756f01eecec754726c09a7067e11db9781e35ac1
URL:
https://github.com/kamailio/kamailio/commit/756f01eecec754726c09a7067e11db9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-04-05T13:00:32+02:00
pv: use core helper to evaluate changes for pv updated message buffer
---
Modified: src/modules/pv/pv_core.c
---
Diff:
https://github.com/kamailio/kamailio/commit/756f01eecec754726c09a7067e11db9…
Patch:
https://github.com/kamailio/kamailio/commit/756f01eecec754726c09a7067e11db9…
---
diff --git a/src/modules/pv/pv_core.c b/src/modules/pv/pv_core.c
index 1f998bfc1d3..40557ba4628 100644
--- a/src/modules/pv/pv_core.c
+++ b/src/modules/pv/pv_core.c
@@ -522,8 +522,6 @@ static str _ksr_pv_msg_buf_updated = STR_NULL;
int pv_get_msg_buf_updated(
struct sip_msg *msg, pv_param_t *param, pv_value_t *res)
{
- dest_info_t send_info;
-
if(msg == NULL)
return -1;
@@ -533,17 +531,7 @@ int pv_get_msg_buf_updated(
_ksr_pv_msg_buf_updated.len = 0;
}
- init_dest_info(&send_info);
- send_info.proto = PROTO_UDP;
- if(msg->first_line.type == SIP_REPLY) {
- _ksr_pv_msg_buf_updated.s = generate_res_buf_from_sip_res(msg,
- (unsigned int *)&_ksr_pv_msg_buf_updated.len,
- BUILD_NO_VIA1_UPDATE);
- } else if(msg->first_line.type == SIP_REQUEST) {
- _ksr_pv_msg_buf_updated.s = build_req_buf_from_sip_req(msg,
- (unsigned int *)&_ksr_pv_msg_buf_updated.len, &send_info,
- BUILD_NO_PATH | BUILD_NO_LOCAL_VIA | BUILD_NO_VIA1_UPDATE);
- } else {
+ if(sip_msg_eval_changes(msg, &_ksr_pv_msg_buf_updated) < 0) {
return pv_get_null(msg, param, res);
}