[sr-dev] [kamailio] kamailio 4.3.3 crash during usrloc save location and DMQ (#373)
Sebastian Damm
notifications at github.com
Tue Oct 27 11:32:30 CET 2015
Thanks. Running now in our dev environment, no crash so far.
I would attach a patch that works against the 4.3 branch, but Github won't allow me to attach .patch files (and no .txt neither, because I don't have write access to the repository).
So this is the plain text patch, that works for us:
```
index 40e89d3..15c0fb3 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) {
```
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/373#issuecomment-151447184
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20151027/cf670342/attachment.html>
More information about the sr-dev
mailing list