[sr-dev] git:4.3:801d9cc9: dmq_usrloc: fixed handling of dmq_ul.get_urecord_by_ruid() response
Daniel-Constantin Mierla
miconda at gmail.com
Tue Oct 27 11:45:48 CET 2015
Module: kamailio
Branch: 4.3
Commit: 801d9cc900a7cdd954733012540299c7ca288007
URL: https://github.com/kamailio/kamailio/commit/801d9cc900a7cdd954733012540299c7ca288007
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-10-27T11:44:06+01:00
dmq_usrloc: fixed handling of dmq_ul.get_urecord_by_ruid() response
- manual backport of master branch commits: 13cde2b and eeb3c16 (GH#373)
---
Modified: modules/dmq_usrloc/usrloc_sync.c
---
Diff: https://github.com/kamailio/kamailio/commit/801d9cc900a7cdd954733012540299c7ca288007.diff
Patch: https://github.com/kamailio/kamailio/commit/801d9cc900a7cdd954733012540299c7ca288007.patch
---
diff --git a/modules/dmq_usrloc/usrloc_sync.c b/modules/dmq_usrloc/usrloc_sync.c
index 40e89d3..c3c7e89 100644
--- a/modules/dmq_usrloc/usrloc_sync.c
+++ b/modules/dmq_usrloc/usrloc_sync.c
@@ -197,14 +197,14 @@ void usrloc_get_all_ucontact(dmq_node_t* node)
memcpy( &aorhash, cp, sizeof(aorhash));
cp = (char*)cp + sizeof(aorhash);
+ r = 0;
+ ptr = 0;
res = dmq_ul.get_urecord_by_ruid(_d, aorhash, &ruid, &r, &ptr);
- aor = r->aor;
- if (res > 0) {
- LM_DBG("'%.*s' Not found in usrloc\n", aor.len, ZSW(aor.s));
- dmq_ul.release_urecord(r);
- dmq_ul.unlock_udomain(_d, &aor);
+ if (res < 0) {
+ LM_DBG("'%.*s' Not found in usrloc\n", ruid.len, ZSW(ruid.s));
continue;
}
+ aor = r->aor;
LM_DBG("- AoR: %.*s AoRhash=%d Flags=%d\n", aor.len, aor.s, aorhash, flags);
while (ptr) {
More information about the sr-dev
mailing list