<!-- 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, …
[View More]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 -->
- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [x] Related to issue #4247
<!--Describe your changes in detail -->
- Add debug log when trying to ping a node.
Do not ping manually disabled nodes!
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4248
-- Commit Summary --
* rtpengine: Add check for skipping pings on manually disabled nodes.
-- File Changes --
M src/modules/rtpengine/rtpengine.c (3)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4248.patchhttps://github.com/kamailio/kamailio/pull/4248.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4248
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4248(a)github.com>
[View Less]
#### Pre-Submission Checklist
- [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 …
[View More]feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue
#### Description
When the `presence` module attempts to clean up records in the `presentity` table, it replaces the `etag` with a static, hardcoded string:
```
"*#-OFFLINE-#*"
```
However, the `presentity` table enforces a uniqueness constraint on the following combination of fields:
```
MariaDB [kamailio]> show create table presentity;
| presentity | CREATE TABLE `presentity` (
...
UNIQUE KEY `presentity_idx` (`username`,`domain`,`event`,`etag`),
```
This approach breaks the uniqueness of etag, which is intended to differentiate records , especially in cases such as parallel calls, or when using kamailio as a forking proxy.
Instead of overwriting the etag with the static offline marker, this patch appends the marker to the existing etag value. This ensures the offline flag is retained while preserving the uniqueness of the etag.
The deletion query was also updated accordingly: it now identifies offline records using a LIKE '%*#-OFFLINE-#*' clause.
Based on testing, the duplicate key errors no longer occur, and the cleanup logic now behaves as expected. This patch improves the reliability of presentity cleanup without requiring schema or index changes.
Please consider merging into master.
Thanks!
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4275
-- Commit Summary --
* presence: preserve etag uniqueness when marking presentity for removal
-- File Changes --
M src/modules/presence/presentity.c (90)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4275.patchhttps://github.com/kamailio/kamailio/pull/4275.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4275
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4275(a)github.com>
[View Less]