Module: sip-router
Branch: master
Commit: f557b9c150de28966fe98dbc396703bd73e464d2
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f557b9c…
Author: Richard Good <richard.good(a)smilecoms.com>
Committer: Richard Good <richard.good(a)smilecoms.com>
Date: Fri Nov 29 11:59:46 2013 +0200
modules/ims_registrar_scscf: added missing domain unlock
registrar_notify.c: missing domain unlock in can_subscribe_to_reg() when all checks fail
---
modules/ims_registrar_scscf/registrar_notify.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/modules/ims_registrar_scscf/registrar_notify.c
b/modules/ims_registrar_scscf/registrar_notify.c
index 295e3c2..d5c4bf9 100644
--- a/modules/ims_registrar_scscf/registrar_notify.c
+++ b/modules/ims_registrar_scscf/registrar_notify.c
@@ -154,7 +154,7 @@ int can_subscribe_to_reg(struct sip_msg *msg, char *_t, char *str2) {
ul.lock_udomain((udomain_t*) _t, &presentity_uri);
res = ul.get_impurecord((udomain_t*) _t, &presentity_uri, &r);
-
+
if (res > 0) {
LM_DBG("'%.*s' Not found in usrloc\n", presentity_uri.len,
presentity_uri.s);
ul.unlock_udomain((udomain_t*) _t, &presentity_uri);
@@ -196,7 +196,7 @@ int can_subscribe_to_reg(struct sip_msg *msg, char *_t, char *str2) {
c = r->contacts;
while (c) {
- if (c->path.len) {
+ if (c->path.len) {
for (i = 0; i < c->path.len - asserted_id.len; i++)
if (strncasecmp(c->path.s + i, asserted_id.s, asserted_id.len) == 0)
{
LM_DBG("Identity found in Path <%.*s>\n",
@@ -208,7 +208,8 @@ int can_subscribe_to_reg(struct sip_msg *msg, char *_t, char *str2) {
}
c = c->next;
}
-
+
+ ul.unlock_udomain((udomain_t*) _t, &presentity_uri);
done:
if (presentity_uri.s) shm_free(presentity_uri.s);