…ate copy of the msg
I've been facing recently some inconsistent replies generated from the two modules. Those replies didn't belong to the current request, but to some old transaction. The issue is due to the check made to decide if the current private copy of the message is consistent with the current transaction: due to memory reallocation there are chances that the check gives a false negative, bringing an old message to be used as a base for the reply. Using transaction's index and label is safer IMO. You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/818
-- Commit Summary --
* modules/ims_auth, modules/ims_registrar_scscf: fix condition for private copy of the msg
-- File Changes --
M modules/ims_auth/pvt_message.c (13) M modules/ims_auth/pvt_message.h (5) M modules/ims_registrar_scscf/pvt_message.c (15) M modules/ims_registrar_scscf/pvt_message.h (5)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/818.patch https://github.com/kamailio/kamailio/pull/818.diff
Wondering if the same should be done in tmx module for t_var.c -- if you found some issues with the current approach, then it might be the case there, as well, it looks like this code in ims is similar with the one from tmx.
You're right, tmx too could be affected by the same issue. In my case the memory allocated for the transaction and the uas request was the same as for a recently closed transaction. And adding the check for the message id did not completely solve the issue, because of the its per-process nature I was still facing false negative in some cases.
You can merge it. Probably we will have to do the same for the tmx.
Merged #818.
Thanks. I will try to have a look on tmx as soon as possible.