]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
fix a weird case where a lock file could be left (but would happen almost never)
authorKevin P. Fleming <kpfleming@digium.com>
Wed, 12 Jul 2006 15:53:53 +0000 (15:53 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Wed, 12 Jul 2006 15:53:53 +0000 (15:53 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@37442 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index 96973623f305f5fe4f3a0a5dba55025529c4d58a..4402d4d4fee6f2a9774951fea40b601a965f1483 100644 (file)
@@ -2617,7 +2617,8 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_
                                } else if (ast_fileexists(tmptxtfile, NULL, NULL) <= 0) {
                                        if (option_debug) 
                                                ast_log(LOG_DEBUG, "The recorded media file is gone, so we should remove the .txt file too!\n");
-                                       unlink(tmptxtfile);     
+                                       unlink(tmptxtfile);
+                                       ast_unlock_path(dir);
                                } else {
                                        for (;;) {
                                                make_file(fn, sizeof(fn), dir, msgnum);