From: Russell Bryant Date: Wed, 11 Jan 2006 07:21:16 +0000 (+0000) Subject: fix temp greetings with odbc storage (issue #6078) X-Git-Tag: 1.4.0-beta1~2990 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ce65af66e79127b6121124be5e6c3bc48eaa5cf;p=thirdparty%2Fasterisk.git fix temp greetings with odbc storage (issue #6078) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7978 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 2eaba17621..4cf8fca067 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -4742,6 +4742,7 @@ static int vm_tempgreeting(struct ast_channel *chan, struct ast_vm_user *vmu, st while (cmd >= 0 && cmd != 't') { if (cmd) retries = 0; + RETRIEVE(prefile, -1); if (ast_fileexists(prefile, NULL, NULL) <= 0) { play_record_review(chan, "vm-rec-temp", prefile, maxgreet, fmtc, 0, vmu, &duration, NULL, record_gain); cmd = 't'; @@ -4751,7 +4752,7 @@ static int vm_tempgreeting(struct ast_channel *chan, struct ast_vm_user *vmu, st cmd = play_record_review(chan, "vm-rec-temp", prefile, maxgreet, fmtc, 0, vmu, &duration, NULL, record_gain); break; case '2': - ast_filedelete(prefile, NULL); + DELETE(prefile, -1, prefile); ast_play_and_wait(chan, "vm-tempremoved"); cmd = 't'; break; @@ -4770,6 +4771,7 @@ static int vm_tempgreeting(struct ast_channel *chan, struct ast_vm_user *vmu, st cmd = 't'; } } + DISPOSE(prefile, -1); } if (cmd == 't') cmd = 0;