Module: kamailio
Branch: master
Commit: 2300d0a2a9c78c72c67596eb129cf7bf86bf300b
URL: https://github.com/kamailio/kamailio/commit/2300d0a2a9c78c72c67596eb129cf7b…
Author: Alex Hermann <alex(a)hexla.nl>
Committer: Alex Hermann <alex(a)hexla.nl>
Date: 2020-10-29T15:24:22+01:00
kex: Let the RPC server do printf as it may have optimizations
Some RPC server implementations may print directly to the output buffer, so
this eliminates a string copy.
---
Modified: src/modules/kex/core_stats.c
---
Diff: https://github.com/kamailio/kamailio/commit/2300d0a2a9c78c72c67596eb129cf7b…
Patch: https://github.com/kamailio/kamailio/commit/2300d0a2a9c78c72c67596eb129cf7b…
---
diff --git a/src/modules/kex/core_stats.c b/src/modules/kex/core_stats.c
index 1ebd235752..a1f14a7dc6 100644
--- a/src/modules/kex/core_stats.c
+++ b/src/modules/kex/core_stats.c
@@ -492,15 +492,13 @@ static void rpc_stats_get_statistics(rpc_t* rpc, void* ctx)
static void rpc_fetch_add_stat(rpc_t* rpc, void* ctx, void* hst, char* g, char* n, unsigned long val, int numeric) {
char nbuf[128];
- char vbuf[32];
int res;
snprintf(nbuf, 127, "%s.%s", g, n);
if (numeric) {
res = rpc->struct_add(hst, "d", nbuf, val);
} else {
- snprintf(vbuf, 31, "%lu", val);
- res = rpc->struct_add(hst, "s", nbuf, vbuf);
+ res = rpc->struct_printf(hst, nbuf, "%lu", val);
}
if (res<0)
{
Module: kamailio
Branch: master
Commit: 0ad80449d8da33732b7b67f1a681fa68c45280e4
URL: https://github.com/kamailio/kamailio/commit/0ad80449d8da33732b7b67f1a681fa6…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2020-11-05T12:21:23+01:00
permissions: document reload_delta parameter
---
Modified: src/modules/permissions/doc/permissions_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/0ad80449d8da33732b7b67f1a681fa6…
Patch: https://github.com/kamailio/kamailio/commit/0ad80449d8da33732b7b67f1a681fa6…
---
diff --git a/src/modules/permissions/doc/permissions_admin.xml b/src/modules/permissions/doc/permissions_admin.xml
index adca339d77..e3b65816e5 100644
--- a/src/modules/permissions/doc/permissions_admin.xml
+++ b/src/modules/permissions/doc/permissions_admin.xml
@@ -846,6 +846,33 @@ modparam("permissions", "load_backends", 1)
</programlisting>
</example>
</section>
+ <section id ="permissions.p.reload_delta">
+ <title><varname>reload_delta</varname> (int)</title>
+ <para>
+ The number of seconds that have to be waited before executing a new
+ RPC reload. By default there is a rate limiting of maximum one reload
+ in five seconds.
+ </para>
+ <para>
+ If set to 0, no rate limit is configured. Note carefully: use this
+ configuration only in tests environments because executing two RPC
+ reloads of the same table at the same time can cause to kamailio
+ to crash.
+ </para>
+ <para>
+ <emphasis>
+ Default value is <quote>5</quote>.
+ </emphasis>
+ </para>
+ <example>
+ <title>Set <varname>reload_delta</varname> parameter</title>
+ <programlisting format="linespecific">
+...
+modparam("permissions", "reload_delta", 1)
+...
+ </programlisting>
+ </example>
+ </section>
</section>
<section>
@@ -1278,8 +1305,8 @@ if (allow_trusted("$si", "any", "$ai")) {
different tables: address table and
subnet table depending on the value of
the mask field (IPv6: 64 or smaller, IPv4: 32 or smaller).
- Note that there is a rate limiting of maximum one reload in
- five seconds.
+ Note that there is a rate limiting defined by 'reload_delta'
+ paramenter. By default is allowed maximum one reload in five seconds.
</para>
<para>Parameters: <emphasis>none</emphasis></para>
</section>
@@ -1361,8 +1388,8 @@ if (allow_trusted("$si", "any", "$ai")) {
<para>
Causes the permissions module to re-read the contents of
the trusted database table into cache memory.
- Note that there is a rate limiting of maximum one reload in
- five seconds.
+ Note that there is a rate limiting defined by 'reload_delta'
+ paramenter. By default is allowed maximum one reload in five seconds.
</para>
<para>Parameters: <emphasis>none</emphasis></para>
</section>
Module: kamailio
Branch: master
Commit: 8d8857314a6d7979dbd5fde584d24919ac1c3328
URL: https://github.com/kamailio/kamailio/commit/8d8857314a6d7979dbd5fde584d2491…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2020-11-05T11:46:32+01:00
modules: readme files regenerated - permissions ... [skip ci]
---
Modified: src/modules/permissions/README
---
Diff: https://github.com/kamailio/kamailio/commit/8d8857314a6d7979dbd5fde584d2491…
Patch: https://github.com/kamailio/kamailio/commit/8d8857314a6d7979dbd5fde584d2491…
---
diff --git a/src/modules/permissions/README b/src/modules/permissions/README
index 9837cfd1b2..ebb097b2cd 100644
--- a/src/modules/permissions/README
+++ b/src/modules/permissions/README
@@ -1024,7 +1024,8 @@ if (allow_trusted("$si", "any", "$ai")) {
database table into cache memory. In cache memory the entries are for
performance reasons stored in two different tables: address table and
subnet table depending on the value of the mask field (IPv6: 64 or
- smaller, IPv4: 32 or smaller).
+ smaller, IPv4: 32 or smaller). Note that there is a rate limiting of
+ maximum one reload in five seconds.
Parameters: none
@@ -1066,7 +1067,8 @@ if (allow_trusted("$si", "any", "$ai")) {
5.7. permissions.trustedReload
Causes the permissions module to re-read the contents of the trusted
- database table into cache memory.
+ database table into cache memory. Note that there is a rate limiting of
+ maximum one reload in five seconds.
Parameters: none
Module: kamailio
Branch: master
Commit: 79f329189be9b73bbb923ee84870255869cff12f
URL: https://github.com/kamailio/kamailio/commit/79f329189be9b73bbb923ee84870255…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2020-11-05T11:45:11+01:00
permissions: add note about RPC reload limit
---
Modified: src/modules/permissions/doc/permissions_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/79f329189be9b73bbb923ee84870255…
Patch: https://github.com/kamailio/kamailio/commit/79f329189be9b73bbb923ee84870255…
---
diff --git a/src/modules/permissions/doc/permissions_admin.xml b/src/modules/permissions/doc/permissions_admin.xml
index 170f197f14..adca339d77 100644
--- a/src/modules/permissions/doc/permissions_admin.xml
+++ b/src/modules/permissions/doc/permissions_admin.xml
@@ -1278,6 +1278,8 @@ if (allow_trusted("$si", "any", "$ai")) {
different tables: address table and
subnet table depending on the value of
the mask field (IPv6: 64 or smaller, IPv4: 32 or smaller).
+ Note that there is a rate limiting of maximum one reload in
+ five seconds.
</para>
<para>Parameters: <emphasis>none</emphasis></para>
</section>
@@ -1359,6 +1361,8 @@ if (allow_trusted("$si", "any", "$ai")) {
<para>
Causes the permissions module to re-read the contents of
the trusted database table into cache memory.
+ Note that there is a rate limiting of maximum one reload in
+ five seconds.
</para>
<para>Parameters: <emphasis>none</emphasis></para>
</section>