Actually the duplicate of code in this case was intentional, because the code for xavp,
xavi and xavu should stay independent of each other, because they can diverge more in the
future and a change in one can break the others.
There are a lot of functions that are somehow duplicate for the three types of xavps, when
it becomes clear that they are going to stay very tight, then many functions may be
combined, but till then I prefer to keep everything specific for one type. Also, when an
eventual merging is decided, we have to balance the complexity of adding many IF
conditions (to detect the type, then to figure out comparison of the names to be case
sensitive or not, a.s.o.) vs some code duplication but clearer api to maintain.
You can make the pull request that just adds the independent xavu_serialize_fields()
function and it will be merged.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2603#issuecomment-762312754