#### 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 - [x] Tested changes locally - [x] Related to issue #2906
#### Description This change solves the issue of parallel forking, subscriber was receiving NOTIFY messages with the same id for different branches
fixes #2906
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2908
-- Commit Summary --
* <a href="https://github.com/kamailio/kamailio/pull/2908/commits/8a924ee177b4764cd5da4522e7964f41cec395f1">pua_dialoginfo: generate uuid as id instead of use callid value</a>
-- File Changes --
M src/modules/pua_dialoginfo/Makefile (11) M src/modules/pua_dialoginfo/dialog_publish.c (18) M src/modules/pua_dialoginfo/pua_dialoginfo.c (47) M src/modules/pua_dialoginfo/pua_dialoginfo.h (9)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2908.patch https://github.com/kamailio/kamailio/pull/2908.diff
Thanks!
Any reason not to use `src/core/utils/sruid.h` instead of `libuuid`? It is used to generate unique ids for register/location records and in other components. That will not add external dependency, making it easier to backport in stable branches.
The patch will stay pretty much the same with the exception of generating the uuid value.
In short, for mod_init(), should be:
``` #include "../../core/utils/sruid.h" ... sruid_t _puadi_sruid; if(sruid_init(&_puadi_sruid, (char)'-', "padi", SRUID_INC)<0) { // error return -1; } ```
Then for generation:
``` extern sruid_t _puadi_sruid; ... sruid_next_safe(&_puadi_sruid);
// uuid available in str _reginfo_sruid.uid; ```
I had in mind to extend the sruid in order to enable modules to register callbacks for generating uuid value, with the goal to do it from the exiting uuid module and make the libuuid-style-uuids available to the other modules without linking against libuuid.
@linuxmaniac pushed 1 commit.
7a10c72e1fdf0f072e41c98aa39423ba8fc527db pua_dialoginfo: generate uuid as id instead of use callid value
Any reason not to use src/core/utils/sruid.h instead of libuuid?
No, just that I forgot about it. What about now?
Looks ok for me.
Merged #2908 into master.