[prev in list] [next in list] [prev in thread] [next in thread]
List: openser-devel
Subject: [sr-dev] git:4.0: modules/pua: added some missing lock releases
From: Juha Heinanen <jh () tutpro ! com>
Date: 2013-12-27 10:00:44
Message-ID: 20131227100044.72DB7EF8074 () rimmer ! ryngle ! com
[Download RAW message or body]
Module: sip-router
Branch: 4.0
Commit: 1b98961522fd8a7eb73ecc7d1772541f8b81aabc
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1b98961522fd8a7eb73ecc7d1772541f8b81aabc
Author: Juha Heinanen <jh@tutpro.com>
Committer: Juha Heinanen <jh@tutpro.com>
Date: Thu Dec 26 17:51:04 2013 +0200
modules/pua: added some missing lock releases
(cherry picked from commit 4eb338611e716e7a32f252acbae52bace6047a0a)
---
modules/pua/send_subscribe.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/modules/pua/send_subscribe.c b/modules/pua/send_subscribe.c
index 006bae4..d568ff2 100644
--- a/modules/pua/send_subscribe.c
+++ b/modules/pua/send_subscribe.c
@@ -1030,8 +1030,12 @@ int send_subscribe(subs_info_t* subs)
insert:
if (subs->expires == 0)
+ {
/* Don't create a new dialog when expires == 0 */
- goto done;
+ if (dbmode != PUA_DB_ONLY)
+ lock_release(&HashT->p_records[hash_code].lock);
+ goto done;
+ }
if(subs->flag & UPDATE_TYPE)
{
@@ -1044,6 +1048,8 @@ insert:
{
LM_ERR("while building callback"
" param\n");
+ if (dbmode != PUA_DB_ONLY)
+ lock_release(&HashT->p_records[hash_code].lock);
goto error;
}
hentity->flag= flag;
@@ -1068,6 +1074,8 @@ insert:
uac_r.dialog = 0;
}
shm_free(hentity);
+ if (dbmode != PUA_DB_ONLY)
+ lock_release(&HashT->p_records[hash_code].lock);
/* Although this is an error must not return -1 as the
calling function must continue processing. */
@@ -1089,6 +1097,8 @@ insert:
if(presentity== NULL)
{
LM_ERR("no more share memory\n");
+ if (dbmode != PUA_DB_ONLY)
+ lock_release(&HashT->p_records[hash_code].lock);
goto error;
}
memset(presentity, 0, size);
_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic