when the contact is deleted using db_delete_ucontact_ruid (default) the uldb_attrs_delete is not called leaving the location_attrs with unwanted records
created uldb_attrs_delete_ruid to be called by db_delete_ucontact_ruid redirected uldb_attrs_delete to uldb_attrs_delete_ruid also changed the places inside contact where uldb_attrs_delete was called to call new uldb_attrs_delete_ruid function You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/102
-- Commit Summary --
* usrloc - fix contacts attrs not deleted
-- File Changes --
M modules/usrloc/ucontact.c (80)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/102.patch https://github.com/kamailio/kamailio/pull/102.diff
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/102
I think the patch is breaking db_delete_ucontact_addr() because it removes the sip domain condition for that case.
I am talking by the next chunk in the patch:
``` @@ -1389,27 +1381,7 @@ int db_delete_ucontact_addr(ucontact_t* _c) ```
Also, use the formatting as suggested in the commit guide lines, it keeps the changelog consistent and coherent:
* http://www.kamailio.org/wiki/devel/git-commit-guidelines#commit_message
Respectively:
``` module_name: short description of the patch [EMPTY LINE] more description of the patch ```
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/102#issuecomment-76017182
isn't ruid unique per contact ?
not sure what i missed in the commit description, was it [EMPTY LINE] ?
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/102#issuecomment-76018168
@miconda please check
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/102#issuecomment-76024339
The first patch seemed to break the deletion of the contact record, as the domain was no longer taken in consideration. The deletion of the contact record is done after the deletion of attrs inside db_delete_ucontact_addr().
The formatting was at least for the first line:
``` module_name: ... ```
I will check the new patch when i get a chance.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/102#issuecomment-76029252
Last commit can be merged.
Can you do it only for that one, without the previous ones and the revert? This should be backported at some point and it is good to have only one commit.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/102#issuecomment-76379803
Btw, if merging not working for a single patch, then just apply it manually to master -- you can get it from:
* https://github.com/kamailio/kamailio/commit/09c51685af36071aad6054d84571c260...
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/102#issuecomment-76379974
Closed #102.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/102#event-243203885
merged manually
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/102#issuecomment-76380126