#### Pre-Submission Checklist - [x] Commit message has the format required by CONTRIBUTING guide - [x] Commits are split per component (core, individual modules, libs, utils, ...) - [x] Each component has a single commit (if not, squash them into one commit) - [x] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change - [x] Small bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds new functionality) - [x] Breaking change (fix or feature that would change existing functionality)
#### Checklist: - [x] PR should be backported to stable branches - [x] Tested changes locally - [x] Related to issue #3929
#### Description The handling of the buffer and pointers in the siputils/chargingvector.c module was inconsistent and led to writing directly in the sip msg buffer, which resulted in the destruction of the SIP message as reported in the issue. During the testing more cases showed up where the PCV handling became ugly and inconsistent, especially in fault scenarios. Therefore more parts have been rewritten to account for those scenarios.
The $pcv(status) pseudo-variable has been added to reflect the state of the P-Charging-Vector in the message, whether it was parsed, had errors (no body or no icid-value), has been deleted or if none is there.
The sip_p_charging_vector() function returns a status value of what it has done, or if it was a no-op call.
A present PCV can only be generated once by the module, either after an explicit deletion or by a forced replacement. After that the call returns with no-op.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3994
-- Commit Summary --
* siputils: bug fix for sip_p_charging_vector * siputils/doc: updated pcv documentation [skip ci]
-- File Changes --
M src/modules/siputils/chargingvector.c (346) M src/modules/siputils/doc/siputils.xml (8) M src/modules/siputils/doc/siputils_admin.xml (50)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3994.patch https://github.com/kamailio/kamailio/pull/3994.diff
@lachbaer pushed 12 commits.
3d1687811fdb8af3646fd543438d187620b65d69 core/rand: fix -Wdeprecated-non-prototype cdc1b145f46e3c2810e5215893102bfe577d036e tm: fix warning uninitialized variable e333f801c68daa65ca1dbd44290d2c41e1f51e90 call_control: fix warning unused variable d9dd4075780e77453083f9be09da4c797297bdab presence: fix warning conflicting prototype ed6272ef92cd722af265796d6d1bae72e1c2a950 cdp: fix warning deprecated-non-prototype 8b2f4f5461a738044e4f1a4ae83c40afa2a74fec ims_usrloc_pcscf: fix warnings deprecated-non-prototype 13d368fedba119e4cd639df7b46158b80855ec98 ims_usrloc_pcscf: fix warning deprecated-non-prototype b7e49d41fde7e398bb8911ad50f4bc3b09f0ed96 rabbitmq: remove deprecation warning 9807b8bfa91f349fbe5ef3ff8271e72649e3bfd7 kazoo: fix deprecation warning d81e99f50f46580468edbcd222cd16d2ff095fdf sms: fix warning and remove old logic 07e8ec7c1cf7798b882b5f02557ef2c833e7b0f8 http_async_client: fix warning deprecated-non-prototype adc22cb30f7cb42e531d3df6c9e3a061182a24e8 siputils: use send interface for icid-genearted-at
@lachbaer pushed 0 commits.
@lachbaer pushed 1 commit.
a31560256c0ad15904655f6fa3c8d84880be4832 siputils: use send interface for icid-genearted-at
@lachbaer pushed 0 commits.
@lachbaer pushed 1 commit.
f69d0bbf2b8c5de2a04ed238d5832e31f868aca0 siputils: use send interface for icid-genearted-at
@lachbaer pushed 1 commit.
e2f17c11d17605a168b3f189af48b4ac4cc2f497 siputils: format chargingvector.c
@lachbaer you have to fix the format on the commits. The check is commit by commit.
@lachbaer pushed 2 commits.
f39ad16d370cc5ab38c707744444ac3c89b19aa2 siputils: bug fix for sip_p_charging_vector 9a1cd6fa40917a54a71441a643af5d009d93f1cf siputils/doc: updated pcv documentation [skip ci]
@linuxmaniac Thank you for the hint. I have updated the commits.
Can someone start the checks again, please? Thank you.
@lachbaer the problem is that the last commit has ``[skip ci]`` so the checks are skipped. Can you, please, rebase and move that documentation commit behind the other one so the last commit message of the PR has no ``[skip ci]`` in it?
@lachbaer pushed 2 commits.
cfd0b6981b3d4e37cd64921254b060dd1c747c5b siputils/doc: updated pcv documentation [skip ci] ef8dbea73ff9c14c37a1ac14b855d20fed757673 siputils: bug fix for sip_p_charging_vector
@lachbaer pushed 1 commit.
51a01b9d569caf9677243a303a02900170e3935f siputils: bug fix for sip_p_charging_vector
Merged #3994 into master.
Thanks!
please update https://github.com/kamailio/kamailio-wiki/blob/main/docs/features/new-in-dev... with the new behavior
new-in-devel.md updated kamailio/kamailio-wiki#60