[svn-commits] trunk r23987 - in /trunk: ./ apps/app_voicemail.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Mon May 1 12:32:48 MST 2006


Author: bweschke
Date: Mon May  1 14:32:47 2006
New Revision: 23987

URL: http://svn.digium.com/view/asterisk?rev=23987&view=rev
Log:
Merged revisions 23985 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r23985 | bweschke | 2006-05-01 14:26:43 -0500 (Mon, 01 May 2006) | 3 lines

 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:
    trunk/   (props changed)
    trunk/apps/app_voicemail.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?rev=23987&r1=23986&r2=23987&view=diff
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Mon May  1 14:32:47 2006
@@ -2565,9 +2565,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 svn-commits mailing list