]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Close voicemail message description file if duration did not meet the minimum, or...
authorJoshua Colp <jcolp@digium.com>
Wed, 10 Oct 2007 14:14:56 +0000 (14:14 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 10 Oct 2007 14:14:56 +0000 (14:14 +0000)
(closes issue #10918)
Reported by: brak2718
Patches:
      vm1.4.12.1.patch uploaded by brak2718 (license 279)

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

apps/app_voicemail.c

index fe55a5019719414893238617f691f9e35b566fc9..09f87e8af2dc888b950546a10b821ca43c7621ef 100644 (file)
@@ -3064,6 +3064,7 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_
 
                if (txt) {
                        if (duration < vmminmessage) {
+                               fclose(txt);
                                if (option_verbose > 2) 
                                        ast_verbose( VERBOSE_PREFIX_3 "Recording was %d seconds long but needs to be at least %d - abandoning\n", duration, vmminmessage);
                                ast_filedelete(tmptxtfile, NULL);