[asterisk-commits] branch 1.2 r23985 -
/branches/1.2/apps/app_voicemail.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon May 1 12:26:44 MST 2006
Author: bweschke
Date: Mon May 1 14:26:43 2006
New Revision: 23985
URL: http://svn.digium.com/view/asterisk?rev=23985&view=rev
Log:
Make sure that when someone 0's out while recording a msg and then chooses to DELETE the recorded file, the .txt file isn't left around by itself to cause problems later. #7061 (dimitripietro reporting, blitzrage confirmed)
Modified:
branches/1.2/apps/app_voicemail.c
Modified: branches/1.2/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/apps/app_voicemail.c?rev=23985&r1=23984&r2=23985&view=diff
==============================================================================
--- branches/1.2/apps/app_voicemail.c (original)
+++ branches/1.2/apps/app_voicemail.c Mon May 1 14:26:43 2006
@@ -2596,9 +2596,14 @@
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 && EXISTS(dir,msgnum,fn,chan->language)) {
fclose(txt);
rename(tmptxtfile, txtfile);
+ } else if (!EXISTS(dir,msgnum,fn,chan->language)) {
+ if (option_debug)
+ ast_log(LOG_DEBUG, "The recorded media file is gone, so we should remove the .txt file too!\n");
+ fclose(txt);
+ unlink(tmptxtfile);
}
goto transfer;
}
More information about the asterisk-commits
mailing list