Module: kamailio
Branch: master
Commit: 658cb4965ba108079116eb60c350d39b18f7e912
URL: https://github.com/kamailio/kamailio/commit/658cb4965ba108079116eb60c350d39…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2020-10-20T10:16:27+02:00
modules: readme files regenerated - registrar ... [skip ci]
---
Modified: src/modules/registrar/README
---
Diff: https://github.com/kamailio/kamailio/commit/658cb4965ba108079116eb60c350d39…
Patch: https://github.com/kamailio/kamailio/commit/658cb4965ba108079116eb60c350d39…
---
diff --git a/src/modules/registrar/README b/src/modules/registrar/README
index 2f89366997..3298f6f41d 100644
--- a/src/modules/registrar/README
+++ b/src/modules/registrar/README
@@ -979,8 +979,9 @@ kamcmd cfg.set_now_int registrar use_expired_contacts 0
location records (in usrloc) depending on Contact and Expires header
fields in the REGISTER message. On success and when called from the
REQUEST_ROUTE, “200 OK” 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 description in reason phrase.
+ currently in 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.
Meaning of the parameters is as follows:
* domain - Logical domain within the registrar. If a database is used
@@ -1028,7 +1029,8 @@ save("location", "0x00", "sip:test@kamailio.org");
no such contacts, -1 will be returned. If there are such contacts,
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).
+ (depending on append_branches parameter value). As a side effect, also
+ branch flags are restored from usrloc.
If the method_filtering option is enabled and request is initial
request without to-tag, the lookup function will return only the
Module: kamailio
Branch: master
Commit: f2996bf733a0b5e00fe124440353b9a69a3532a2
URL: https://github.com/kamailio/kamailio/commit/f2996bf733a0b5e00fe124440353b9a…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: 2020-10-20T11:04:58+03:00
registrar: added note about branch flags in save()/lookup() doc
---
Modified: src/modules/registrar/doc/registrar_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/f2996bf733a0b5e00fe124440353b9a…
Patch: https://github.com/kamailio/kamailio/commit/f2996bf733a0b5e00fe124440353b9a…
---
diff --git a/src/modules/registrar/doc/registrar_admin.xml b/src/modules/registrar/doc/registrar_admin.xml
index 4fb1e8a5e8..94ce4b3a0b 100644
--- a/src/modules/registrar/doc/registrar_admin.xml
+++ b/src/modules/registrar/doc/registrar_admin.xml
@@ -1180,7 +1180,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>
@@ -1281,6 +1282,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
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
Check for src->s is also done before the memory allocation.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2518
-- Commit Summary --
* core: Remove redundant check from (shm|pkg)_str_dup()
-- File Changes --
M src/core/ut.h (12)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2518.patchhttps://github.com/kamailio/kamailio/pull/2518.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2518
### Description
alias_db_lookup is returning `-1` if result is not found. The documentation says "The function returns TRUE if R-URI is alias and it was replaced by user's SIP uri." The implication is that it should return FALSE if that is not the case. Sample code:
```
$vn(init_ruri) = $ru;
$vn(alias_found) = alias_db_lookup("DbAliases");
xlogl("L_NOTIFY", "$$vn(alias_found) is [$vn(alias_found)]\n");
if ( !$vn(alias_found) ) {
xlogl("L_NOTIFY", "No alias found for [$vn(init_ruri)]\n");
return;
}
xlogl("L_NOTIFY", "Found alias [$ru] for [$vn(init_ruri)]\n");
```
The value for $vn(alias_found) is -1 if there is no alias, and thus the condition never occurs. "Found alias" line always occurs, even if there is no record in the DB.
I think this should probably be considered a documentation issue, but I'm not sure what the other possible values are for return and their meanings. Maybe there's a different value if an alias is found but not updated, etc?
### Troubleshooting
Example above
#### Reproduction
Example above.
#### Debugging Data
Not applicable
#### Log Messages
N/A
#### SIP Traffic
N/A
### Possible Solutions
Probably best to update documentation. The statement, "The function returns TRUE if R-URI is alias and it was replaced by user's SIP uri." implies that if that does not happen, then the return would be FALSE.
### Additional Information
`5.4.1`
* **Operating System**:
Debian 10
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2517
Hello,
to highlight it better, I am sending a short announcement to sr-dev to
inform about changes done to ip_addr.{c,h} earlier today.
First is about the use of inet_ntop() for converting IPv6 address to
string representation, which does it conforming to rfc5952, this is
happening when global parameter ipv6_hex_style="c" (this being the
default now). According to manual page, inet_ntop() is conforming with
POSIX 2001 and already used in core socket_info.c as well as a few
modules such as rtpengine, thus I expect no problems with it, likely no
older compilers will be used with kamailio. The benefit is the use a
standard compliant function and output.
Second: becaise ip_addr.h had a lot of static inline functions, several
of them being quite consistent in size, I relocated many implementations
to ip_addr.c, removing the static inline declarators. As I read on the
net, the benefit of inline for performances can be invalidated if it is
abused, because it can make CPU instructions cache less efficient.
Moreover, because of their size, some of them were likely not inlined.
Moreover, functions calling inside other functions seems not to be
inlined, therefore I tried to relocate those that have a chain of
functions executed inside. Overall, the performance gain of inline is
really minimal, even when inlining is applied by compiler.
The effect of the second change is that many static buffers used by the
former static-inline functions are declared only once. It was well known
that they used static buffer and the result was cloned after use of the
functions, so it should be no regression introduced.
Anyhow, if someone observes problems with ip addresses in master branch,
just open a bug and it will be fixed.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
### Description
According [rfc5952#section-4.2.1](https://tools.ietf.org/html/rfc5952#section-4.2.1)
> **4.2.1. Shorten as Much as Possible**
The use of the symbol "::" MUST be used to its maximum capability.
For example, 2001:db8:0:0:0:0:2:1 must be shortened to 2001:db8::2:1.
The current Kamailio master does not use `::` inside IPv6 address representation. Example
```
INVITE user(a)example.com SIP/2.0
Record-Route: <sip:[2600:1f1c:6d5:aa02:0:0:0:4];transport=tcp;r2=on;lr=on;ftag=gK0c013f75>
Record-Route: <sip:3.101.84.4;r2=on;lr=on;ftag=gK0c013f75>
Via: SIP/2.0/TCP [2600:1f1c:6d5:aa02:0:0:0:4];branch=z9hG4bK66f8.35b78246c71e1583d2785ae652c42ed5.0
```
### Possible Solutions
Port feature from another IPv6 address formatting functions with RFC5952 support.
Example: function [`x_IPv6ToString`](https://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/ncbi__ipv6_8c_source.html), string 404 - 440.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2510