Module: kamailio Branch: master Commit: 0920992eb2b60b1c98b187ddfd411dff8a8ba63a URL: https://github.com/kamailio/kamailio/commit/0920992eb2b60b1c98b187ddfd411dff...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2023-04-14T11:56:22+02:00
math: renamed math_log() to math_logN() to be more suggestive
---
Modified: src/modules/math/doc/math_admin.xml Modified: src/modules/math/math_mod.c
---
Diff: https://github.com/kamailio/kamailio/commit/0920992eb2b60b1c98b187ddfd411dff... Patch: https://github.com/kamailio/kamailio/commit/0920992eb2b60b1c98b187ddfd411dff...
---
diff --git a/src/modules/math/doc/math_admin.xml b/src/modules/math/doc/math_admin.xml index e3695fefba..4e6a9a513e 100644 --- a/src/modules/math/doc/math_admin.xml +++ b/src/modules/math/doc/math_admin.xml @@ -80,9 +80,9 @@ </programlisting> </example> </section> - <section id="math.f.log"> + <section id="math.f.logN"> <title> - <function moreinfo="none">log(x, res)</function> + <function moreinfo="none">logN(x, res)</function> </title> <para> The function computes the natural logarithm of x and stores the result @@ -92,12 +92,12 @@ This function can be used from ANY_ROUTE. </para> <example> - <title><function>log</function> usage</title> + <title><function>logN</function> usage</title> <programlisting format="linespecific"> ... - log("10", "$var(res)"); + logN("10", "$var(res)"); $var(x) = 10; - log("$var(x)", "$var(res)"); + logN("$var(x)", "$var(res)"); ... </programlisting> </example> diff --git a/src/modules/math/math_mod.c b/src/modules/math/math_mod.c index 314bb23e9a..ae73a7bbc4 100644 --- a/src/modules/math/math_mod.c +++ b/src/modules/math/math_mod.c @@ -36,7 +36,7 @@ MODULE_VERSION
static int w_math_pow(sip_msg_t *msg, char *v1, char *v2, char *r); -static int w_math_log(sip_msg_t *msg, char *v1, char *r); +static int w_math_logN(sip_msg_t *msg, char *v1, char *r); static int w_math_log2(sip_msg_t *msg, char *v1, char *r); static int w_math_log10(sip_msg_t *msg, char *v1, char *r); static int fixup_math_p2(void **param, int param_no); @@ -47,7 +47,7 @@ static int fixup_math_p3(void **param, int param_no); static cmd_export_t cmds[]={ {"math_pow", (cmd_function)w_math_pow, 3, fixup_math_p3, 0, ANY_ROUTE}, - {"math_log", (cmd_function)w_math_log, 2, fixup_math_p2, + {"math_logN", (cmd_function)w_math_logN, 2, fixup_math_p2, 0, ANY_ROUTE}, {"math_log2", (cmd_function)w_math_log2, 2, fixup_math_p2, 0, ANY_ROUTE}, @@ -108,7 +108,7 @@ static int w_math_pow(sip_msg_t *msg, char *v1, char *v2, char *r) /** * */ -static int w_math_log(sip_msg_t *msg, char *v1, char *r) +static int w_math_logN(sip_msg_t *msg, char *v1, char *r) { int vi1 = 0; pv_spec_t *dst;