From 0920992eb2b60b1c98b187ddfd411dff8a8ba63a Mon Sep 17 00:00:00 2001 From: Daniel-Constantin Mierla Date: Fri, 14 Apr 2023 11:56:22 +0200 Subject: [PATCH] math: renamed math_log() to math_logN() to be more suggestive --- src/modules/math/doc/math_admin.xml | 10 +++++----- src/modules/math/math_mod.c | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/modules/math/doc/math_admin.xml b/src/modules/math/doc/math_admin.xml index e3695fefbaf..4e6a9a513ef 100644 --- a/src/modules/math/doc/math_admin.xml +++ b/src/modules/math/doc/math_admin.xml @@ -80,9 +80,9 @@ -
+
- <function moreinfo="none">log(x, res)</function> + <function moreinfo="none">logN(x, res)</function> The function computes the natural logarithm of x and stores the result @@ -92,12 +92,12 @@ This function can be used from ANY_ROUTE. - <function>log</function> usage + <function>logN</function> usage ... - log("10", "$var(res)"); + logN("10", "$var(res)"); $var(x) = 10; - log("$var(x)", "$var(res)"); + logN("$var(x)", "$var(res)"); ... diff --git a/src/modules/math/math_mod.c b/src/modules/math/math_mod.c index 314bb23e9a5..ae73a7bbc42 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;