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.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 73c4ee2e5..c2f8f7f2a 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -6950,6 +6950,16 @@ static int forward_message(struct ast_channel *chan, char *context, struct vm_st
#endif
}
DISPOSE(dir, curmsg);
+#ifndef IMAP_STORAGE
+ if (cmd) { /* assuming hangup, cleanup backup file */
+ make_file(msgfile, sizeof(msgfile), dir, curmsg);
+ strcpy(textfile, msgfile);
+ strcpy(backup_textfile, msgfile);
+ strncat(textfile, ".txt", sizeof(textfile) - strlen(textfile) - 1);
+ strncat(backup_textfile, "-bak.txt", sizeof(backup_textfile) - strlen(backup_textfile) - 1);
+ rename(backup_textfile, textfile);
+ }
+#endif
}
/* If anything failed above, we still have this list to free */