]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Adding in appropriate unlocks for the locks I added. Thanks to joetester on IRC
authorMark Michelson <mmichelson@digium.com>
Mon, 14 Jan 2008 20:59:26 +0000 (20:59 +0000)
committerMark Michelson <mmichelson@digium.com>
Mon, 14 Jan 2008 20:59:26 +0000 (20:59 +0000)
for pointing this out.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@98849 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index 8ba4b5eaf692a5cf5ab59ee446312f8f95252d3f..971f913d37dd14d6d7319047e185f4b5d4a98a6b 100644 (file)
@@ -8812,8 +8812,10 @@ static struct vm_state *get_vm_state_by_imapuser(char *user, int interactive)
                        if (vlist->vms->imapuser) {
                                if (!strcmp(vlist->vms->imapuser,user)) {
                                        if (interactive == 2) {
+                                               ast_mutex_unlock(&vmstate_lock);
                                                return vlist->vms;
                                        } else if (vlist->vms->interactive == interactive) {
+                                               ast_mutex_unlock(&vmstate_lock);
                                                return vlist->vms;
                                        }
                                }
@@ -8849,6 +8851,7 @@ static struct vm_state *get_vm_state_by_mailbox(const char *mailbox, int interac
                                if (!strcmp(vlist->vms->username,mailbox) && vlist->vms->interactive == interactive) {
                                        if (option_debug > 2)
                                                ast_log(LOG_DEBUG, "    Found it!\n");
+                                       ast_mutex_unlock(&vmstate_lock);
                                        return vlist->vms;
                                }
                        } else {