Module: kamailio
Branch: 5.4
Commit: 0752f63d41a5c02bc1a5612a22797f186e291119
URL: https://github.com/kamailio/kamailio/commit/0752f63d41a5c02bc1a5612a22797f1…
Author: Alex Hermann <alex(a)hexla.nl>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-10-23T10:57:11+02:00
core: Document that a str can be zero-terminated
But by default it isn't.
The functions shm_str_dup() and pkg_str_dup() will always create a
zero-terminated copy
(cherry picked from commit fcdfaf98acf8a66e84b9dccc767fb52c0cf0d460)
---
Modified: src/core/str.h
---
Diff: https://github.com/kamailio/kamailio/commit/0752f63d41a5c02bc1a5612a22797f1…
Patch: https://github.com/kamailio/kamailio/commit/0752f63d41a5c02bc1a5612a22797f1…
---
diff --git a/src/core/str.h b/src/core/str.h
index 01b12ecb62..58d7d627f6 100644
--- a/src/core/str.h
+++ b/src/core/str.h
@@ -40,13 +40,16 @@
* need to make a zero-terminated copy of it.
*
* @section drawbacks Drawbacks
- * Note well that the fact that string stored
- * using this data structure are not zero terminated makes them a little
- * incovenient to use with many standard libc string functions, because these
- * usually expect the input to be zero-terminated. In this case you have to
- * either make a zero-terminated copy or inject the terminating zero behind
- * the actuall string (if possible). Note that injecting a zero terminating
- * characters is considered to be dangerous.
+ * Note well that the fact that a string stored
+ * using this data structure are not guaranteed to be zero terminated (by
+ * default they're not) makes them a little incovenient to use with many
+ * standard libc string functions, because these usually expect the input
+ * to be zero-terminated.
+ * In this case you have to either make a zero-terminated copy or inject the
+ * terminating zero behind the actuall string (if possible). Note that
+ * injecting a zero terminating characters is considered to be dangerous.
+ * The functions shm_str_dup() and pkg_str_dup() will always create a
+ * zero-terminated copy.
*/
/** @file
Module: kamailio
Branch: 5.4
Commit: f050ce2dc5f27a08bf5c5364e4002b646802eb81
URL: https://github.com/kamailio/kamailio/commit/f050ce2dc5f27a08bf5c5364e4002b6…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-10-23T10:56:28+02:00
registrar: added note about branch flags in save()/lookup() doc
(cherry picked from commit f2996bf733a0b5e00fe124440353b9a69a3532a2)
---
Modified: src/modules/registrar/doc/registrar_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/f050ce2dc5f27a08bf5c5364e4002b6…
Patch: https://github.com/kamailio/kamailio/commit/f050ce2dc5f27a08bf5c5364e4002b6…
---
diff --git a/src/modules/registrar/doc/registrar_admin.xml b/src/modules/registrar/doc/registrar_admin.xml
index 461605f3d0..266f7b35e2 100644
--- a/src/modules/registrar/doc/registrar_admin.xml
+++ b/src/modules/registrar/doc/registrar_admin.xml
@@ -1154,7 +1154,8 @@ kamcmd cfg.set_now_int registrar use_expired_contacts 0
modify location records (in usrloc) depending on Contact and Expires header fields in the
REGISTER message. On success and when called from the REQUEST_ROUTE,
<quote>200 OK</quote> will be returned listing all contacts that are currently in
- the location database. On an error, an error message will be sent with a short
+ the location database. As a side effect, also branch flags are
+ stored in usrloc. On an error, an error message will be sent with a short
description in reason phrase.
</para>
<para>Meaning of the parameters is as follows:</para>
@@ -1255,6 +1256,7 @@ save("location", "0x00", "sip:test@kamailio.org");
Request-URI will be overwritten with the contact that has
the highest q value and optionally the rest will be appended to
the message (depending on append_branches parameter value).
+ As a side effect, also branch flags are restored from usrloc.
</para>
<para>
If the <varname>method_filtering</varname> option is enabled and
Module: kamailio
Branch: 5.4
Commit: 550840b4b9ce8df9acdf875f907ce86533fea43e
URL: https://github.com/kamailio/kamailio/commit/550840b4b9ce8df9acdf875f907ce86…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-10-23T10:55:52+02:00
pipelimit: use unsigned to compute size and for iterator
(cherry picked from commit 23818fb34d09a487654ea89c9f29b880c0c75197)
---
Modified: src/modules/pipelimit/pl_statistics.c
---
Diff: https://github.com/kamailio/kamailio/commit/550840b4b9ce8df9acdf875f907ce86…
Patch: https://github.com/kamailio/kamailio/commit/550840b4b9ce8df9acdf875f907ce86…
---
diff --git a/src/modules/pipelimit/pl_statistics.c b/src/modules/pipelimit/pl_statistics.c
index e1afa2ffb8..0c6c52d389 100644
--- a/src/modules/pipelimit/pl_statistics.c
+++ b/src/modules/pipelimit/pl_statistics.c
@@ -137,10 +137,12 @@ int get_socket_list_from_proto_and_family(int **ipList, int protocol, int family
struct socket_info *si;
struct socket_info** list;
- int num_ip_octets = family == AF_INET ? NUM_IP_OCTETS : NUM_IPV6_OCTETS;
- int numberOfSockets = 0;
+ unsigned int num_ip_octets = 0;
+ unsigned int numberOfSockets = 0;
int currentRow = 0;
+ num_ip_octets = (family == AF_INET) ? NUM_IP_OCTETS : NUM_IPV6_OCTETS;
+
/* I hate to use #ifdefs, but this is necessary because of the way
* get_sock_info_list() is defined. */
#ifndef USE_TCP
@@ -198,7 +200,7 @@ int get_socket_list_from_proto_and_family(int **ipList, int protocol, int family
/* Extract out the IP Addresses and ports. */
for(si=list?*list:0; si; si=si->next){
- int i;
+ unsigned int i;
/* We currently only support IPV4. */
if (si->address.af != family) {