[sr-dev] git:master:13cde2bb: dmq_usrloc: proper handle of not found urecord by uuid
Daniel-Constantin Mierla
miconda at gmail.com
Fri Oct 23 17:50:39 CEST 2015
Module: kamailio
Branch: master
Commit: 13cde2bb1deda9cc67925ca01910e41150c4435e
URL: https://github.com/kamailio/kamailio/commit/13cde2bb1deda9cc67925ca01910e41150c4435e
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-10-23T17:49:31+02:00
dmq_usrloc: proper handle of not found urecord by uuid
- return code is negative and in this case is not locking the slot
---
Modified: modules/dmq_usrloc/usrloc_sync.c
---
Diff: https://github.com/kamailio/kamailio/commit/13cde2bb1deda9cc67925ca01910e41150c4435e.diff
Patch: https://github.com/kamailio/kamailio/commit/13cde2bb1deda9cc67925ca01910e41150c4435e.patch
---
diff --git a/modules/dmq_usrloc/usrloc_sync.c b/modules/dmq_usrloc/usrloc_sync.c
index 06ef6b6..4d53d0c 100644
--- a/modules/dmq_usrloc/usrloc_sync.c
+++ b/modules/dmq_usrloc/usrloc_sync.c
@@ -197,12 +197,12 @@ 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) {
+ 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);
continue;
}
LM_DBG("- AoR: %.*s AoRhash=%d Flags=%d\n", aor.len, aor.s, aorhash, flags);
More information about the sr-dev
mailing list