Module: kamailio
Branch: master
Commit: b814c5aadc690ceeca75e6ce25bf850ddfc4b44a
URL: https://github.com/kamailio/kamailio/commit/b814c5aadc690ceeca75e6ce25bf850…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-10-27T09:41:51+02:00
rr: more log details when 2nd rr with r2=on is not matching a local socket
---
Modified: modules/rr/loose.c
---
Diff: https://github.com/kamailio/kamailio/commit/b814c5aadc690ceeca75e6ce25bf850…
Patch: https://github.com/kamailio/kamailio/commit/b814c5aadc690ceeca75e6ce25bf850…
---
diff --git a/modules/rr/loose.c b/modules/rr/loose.c
index 71d7d43..afcbbbc 100644
--- a/modules/rr/loose.c
+++ b/modules/rr/loose.c
@@ -125,7 +125,7 @@ static inline int find_first_route(struct sip_msg* _m)
static inline int is_myself(sip_uri_t *_puri)
{
int ret;
-
+
ret = check_self(&_puri->host,
_puri->port_no?_puri->port_no:SIP_PORT, 0);/* match all protos*/
if (ret < 0) return 0;
@@ -138,7 +138,7 @@ static inline int is_myself(sip_uri_t *_puri)
return 0;
}
#endif
-
+
if(ret==1) {
/* match on host:port, but if gruu, then fail */
if(_puri->gr.s!=NULL)
@@ -831,8 +831,14 @@ static inline int after_loose(struct sip_msg* _m, int preloaded)
if (si) {
set_force_socket(_m, si);
} else {
- if (enable_socket_mismatch_warning)
- LM_WARN("no socket found for match second RR\n");
+ if (enable_socket_mismatch_warning) {
+ LM_WARN("no socket found for match second RR (%.*s)\n",
+ rt->nameaddr.uri.len, ZSW(rt->nameaddr.uri.s));
+ if(!is_myself(&puri)) {
+ LM_WARN("second RR uri si not myself (%.*s)\n",
+ rt->nameaddr.uri.len, ZSW(rt->nameaddr.uri.s));
+ }
+ }
}
}
Module: kamailio
Branch: master
Commit: 0683df11e319aa3db45cd9b18af3a3c3b02088a8
URL: https://github.com/kamailio/kamailio/commit/0683df11e319aa3db45cd9b18af3a3c…
Author: Camille Oudot <camille.oudot(a)orange.com>
Committer: Camille Oudot <camille.oudot(a)orange.com>
Date: 2016-10-25T11:32:35+02:00
mem: TLSF bit ops cleanup / 64 bits improvement
- remove unsupproted compilers
- use 64 bits __builtin_clzl() instead of twice 32 bits __builtin_clz()
---
Modified: mem/tlsf_malloc_bits.h
---
Diff: https://github.com/kamailio/kamailio/commit/0683df11e319aa3db45cd9b18af3a3c…
Patch: https://github.com/kamailio/kamailio/commit/0683df11e319aa3db45cd9b18af3a3c…
---
diff --git a/mem/tlsf_malloc_bits.h b/mem/tlsf_malloc_bits.h
index 3be2579..29c783d 100644
--- a/mem/tlsf_malloc_bits.h
+++ b/mem/tlsf_malloc_bits.h
@@ -37,6 +37,8 @@
/*
** gcc 3.4 and above have builtin support, specialized for architecture.
** Some compilers masquerade as gcc; patchlevel test filters them out.
+**
+** Note: clang is compatible with GCC builtins and will also define those macros
*/
#if defined (__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) \
&& defined (__GNUC_PATCHLEVEL__)
@@ -52,78 +54,13 @@ tlsf_decl int tlsf_fls(unsigned int word)
return bit - 1;
}
-#elif defined (_MSC_VER) && (_MSC_VER >= 1400) && (defined (_M_IX86) || defined (_M_X64))
-/* Microsoft Visual C++ support on x86/X64 architectures. */
-
-#include <intrin.h>
-
-#pragma intrinsic(_BitScanReverse)
-#pragma intrinsic(_BitScanForward)
-
-tlsf_decl int tlsf_fls(unsigned int word)
-{
- unsigned long index;
- return _BitScanReverse(&index, word) ? index : -1;
-}
-
-tlsf_decl int tlsf_ffs(unsigned int word)
-{
- unsigned long index;
- return _BitScanForward(&index, word) ? index : -1;
-}
-
-#elif defined (_MSC_VER) && defined (_M_PPC)
-/* Microsoft Visual C++ support on PowerPC architectures. */
-
-#include <ppcintrinsics.h>
-
-tlsf_decl int tlsf_fls(unsigned int word)
-{
- const int bit = 32 - _CountLeadingZeros(word);
- return bit - 1;
-}
-
-tlsf_decl int tlsf_ffs(unsigned int word)
-{
- const unsigned int reverse = word & (~word + 1);
- const int bit = 32 - _CountLeadingZeros(reverse);
- return bit - 1;
-}
-
-#elif defined (__ARMCC_VERSION)
-/* RealView Compilation Tools for ARM */
-
-tlsf_decl int tlsf_ffs(unsigned int word)
-{
- const unsigned int reverse = word & (~word + 1);
- const int bit = 32 - __clz(reverse);
- return bit - 1;
-}
-
-tlsf_decl int tlsf_fls(unsigned int word)
-{
- const int bit = word ? 32 - __clz(word) : 0;
- return bit - 1;
-}
-
-#elif defined (__ghs__)
-/* Green Hills support for PowerPC */
-
-#include <ppc_ghs.h>
-
-tlsf_decl int tlsf_ffs(unsigned int word)
-{
- const unsigned int reverse = word & (~word + 1);
- const int bit = 32 - __CLZ32(reverse);
- return bit - 1;
-}
-
-tlsf_decl int tlsf_fls(unsigned int word)
+#if defined (TLSF_64BIT)
+tlsf_decl int tlsf_fls_sizet(size_t size)
{
- const int bit = word ? 32 - __CLZ32(word) : 0;
+ const int bit = size ? 64 - __builtin_clzl(size) : 0;
return bit - 1;
}
-
+#endif
#else
/* Fall back to generic implementation. */
@@ -152,9 +89,6 @@ tlsf_decl int tlsf_fls(unsigned int word)
return tlsf_fls_generic(word) - 1;
}
-#endif
-
-/* Possibly 64-bit version of tlsf_fls. */
#if defined (TLSF_64BIT)
tlsf_decl int tlsf_fls_sizet(size_t size)
{
@@ -171,7 +105,12 @@ tlsf_decl int tlsf_fls_sizet(size_t size)
}
return bits;
}
-#else
+#endif /* defined (TLSF_64BIT) */
+
+#endif /* GNUC */
+
+
+#if !defined (TLSF_64BIT)
#define tlsf_fls_sizet tlsf_fls
#endif