aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_voicemail.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r--apps/app_voicemail.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 55a9c8456..e0fc6b8c4 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -2596,8 +2596,10 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_
ast_log(LOG_WARNING, "Error opening text file for output\n");
res = play_record_review(chan, NULL, fn, vmmaxmessage, fmt, 1, vmu, &duration, dir, options->record_gain);
if (res == '0') {
- if (txt)
+ if (txt) {
fclose(txt);
+ rename(tmptxtfile, txtfile);
+ }
goto transfer;
}
if (res > 0)