[Asterisk-cvs] asterisk/apps app_voicemail.c,1.46,1.47

martinp at lists.digium.com martinp at lists.digium.com
Mon Dec 22 12:30:47 CST 2003


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv2897/apps

Modified Files:
	app_voicemail.c 
Log Message:
Don't distroy the original message when prepending and if prepending forward with the prepended message even if the hangup is received


Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- app_voicemail.c	22 Dec 2003 16:35:48 -0000	1.46
+++ app_voicemail.c	22 Dec 2003 18:22:21 -0000	1.47
@@ -1048,6 +1048,7 @@
 				ast_verbose( VERBOSE_PREFIX_3 "User hung up\n");
 			res = -1;
 			outmsg=1;
+#if 0
 			/* delete all the prepend files */
 			for (x=0;x<fmtcnt;x++) {
 				if (!others[x])
@@ -1055,15 +1056,20 @@
 				ast_closestream(others[x]);
 				ast_filedelete(prependfile, sfmt[x]);
 			}
+#endif
 		}
 	} else {
 		ast_log(LOG_WARNING, "Error creating writestream '%s', format '%s'\n", prependfile, sfmt[x]); 
 	}
+#if 0
 	if (outmsg > 1) {
+#else
+	if (outmsg) {
+#endif
 		struct ast_frame *fr;
 		for (x=0;x<fmtcnt;x++) {
 			snprintf(comment, sizeof(comment), "Opening the real file %s.%s\n", recordfile, sfmt[x]);
-			realfiles[x] = ast_writefile(recordfile, sfmt[x], comment, O_RDONLY, 0, 0);
+			realfiles[x] = ast_readfile(recordfile, sfmt[x], comment, O_RDONLY, 0, 0);
 			if (!others[x] || !realfiles[x])
 				break;
 			if (totalsilence)




More information about the svn-commits mailing list