Module: sip-router Branch: 3.3 Commit: 1d5618ad356c16973b699ecea223424bcca9c513 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1d5618ad...
Author: Juha Heinanen jh@tutpro.com Committer: Juha Heinanen jh@tutpro.com Date: Fri Dec 27 12:11:30 2013 +0200
modules_k/pua: added some missing lock releases (backport)
---
modules_k/pua/send_subscribe.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/modules_k/pua/send_subscribe.c b/modules_k/pua/send_subscribe.c index c1476cd..14435a4 100644 --- a/modules_k/pua/send_subscribe.c +++ b/modules_k/pua/send_subscribe.c @@ -1012,8 +1012,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) { @@ -1026,6 +1030,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; @@ -1050,6 +1056,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. */ @@ -1071,6 +1079,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);