Module: sip-router Branch: master Commit: 4eb338611e716e7a32f252acbae52bace6047a0a URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4eb33861...
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
---
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);