pkg_malloc() for name and value is not needed. It is more traumatic to allocate in pkg,
then copy there and then free after adding as Kamailio AVP (there is no benefit, only a
lot of operations here for nothing good). When adding as a K AVP, the name and value are
cloned in shared memory. Copying the values directly from the RADIUS AVP is ok (like it
was so far) and faster.
The new patches are on top of the old one, this is not what we want to commit, because
there must be a patch per module, starting from the existing code. Now it is hard to
review the contribution, because we have to analyse patches to patches, not being easy to
spot eventual bugs. These patches in the pull request must be discarded and create new
ones against Kamailio master.
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/14#issuecomment-68605236