[sr-dev] [kamailio/kamailio] nathelper : added new function set_alias_to_avp (#2124)

Daniel-Constantin Mierla notifications at github.com
Mon Nov 11 14:27:37 CET 2019


Looking at the resulting diff of the PR (https://patch-diff.githubusercontent.com/raw/kamailio/kamailio/pull/2124.diff), I see that the src/core/parser/parse_uri.h has a single empty line removed. I guess that is not really needed.

The the name of the C function exported to kamailio.cfg file is named `ki_set_alias_to_avp`, but the `ki_` prefix is used for functions exported to KEMI interface. Those exported to kamailio.cfg have usually the `w_` prefix. Then the prototype for kamailio.cfg functions is with three parameters (one sip_msg* and two char*), it is safer to set it like this even if the 2nd parameter is not used, because the core interpreter gives NULL as 2nd char* param when executing the function.

Then, you should export the new function to kemi interface as well, which is more or less the `set_alias_to_avp_f()`, eventually you name this one `ki_set_alias_to_avp`.

-- 
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/2124#issuecomment-552445293
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20191111/0bc80d11/attachment-0001.html>


More information about the sr-dev mailing list