]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Bug 7287 - A too short voicemail with ODBC_STORAGE will cause the first voicemail...
authorTilghman Lesher <tilghman@meg.abyt.es>
Tue, 6 Jun 2006 16:55:23 +0000 (16:55 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Tue, 6 Jun 2006 16:55:23 +0000 (16:55 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@32605 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index b595944f2dd1aa7363307057ca7800001503a818..b61b54d625e612dad9d081673d1f4e06831f1398 100644 (file)
@@ -2601,7 +2601,8 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_
                        if (duration < vmminmessage) {
                                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);
-                               DELETE(dir,msgnum,fn);
+                               ast_filedelete(tmptxtfile, NULL);
+                               unlink(tmptxtfile);
                        } else {
                                fprintf(txt, "duration=%d\n", duration);
                                fclose(txt);