#### 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
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3994
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3994(a)github.com>