[asterisk-commits] mmichelson: branch mmichelson/imap_consistency_trunk r135590 - /team/mmichels...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Aug 4 17:02:03 CDT 2008


Author: mmichelson
Date: Mon Aug  4 17:02:02 2008
New Revision: 135590

URL: http://svn.digium.com/view/asterisk?view=rev&rev=135590
Log:
Message forwarding with a prepended message is now functioning
properly. 


Modified:
    team/mmichelson/imap_consistency_trunk/apps/app_voicemail.c

Modified: team/mmichelson/imap_consistency_trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/mmichelson/imap_consistency_trunk/apps/app_voicemail.c?view=diff&rev=135590&r1=135589&r2=135590
==============================================================================
--- team/mmichelson/imap_consistency_trunk/apps/app_voicemail.c (original)
+++ team/mmichelson/imap_consistency_trunk/apps/app_voicemail.c Mon Aug  4 17:02:02 2008
@@ -1458,6 +1458,7 @@
 	}
 	
 	make_file(vms->fn, sizeof(vms->fn), dir, msgnum);
+	snprintf(vms->introfn, sizeof(vms->introfn), "%sintro\n", vms->fn);
 
 	ast_log(LOG_NOTICE, "The filenames are %s and %s\n", vms->fn, vms->introfn);
 
@@ -1505,7 +1506,9 @@
 	}
 	
 	save_body(body, vms, "2", attachedfilefmt, 0);
-	save_body(body, vms, "3", attachedfilefmt, 1);
+	if (save_body(body, vms, "3", attachedfilefmt, 1)) {
+		*vms->introfn = '\0';
+	}
 
 	ast_log(LOG_NOTICE, "Now the filenames are %s and %s\n", vms->fn, vms->introfn);
 	ast_log(LOG_NOTICE, "BREAKPOINT!!!\n");
@@ -1775,7 +1778,7 @@
 		imap_delete_old_greeting(fn, vms);
 	}
 	
-	ast_log(LOG_NOTICE, "I'm to be storing the following files: %s and %s to mailbox %s\n", fn, introfn, vmu->mailbox);
+	ast_log(LOG_NOTICE, "I'm to be storing the following files: %s(%s) and %s(%s) to mailbox %s\n", fn, ast_fileexists(fn, NULL, NULL) > 0 ? "Exists" : "Don't Exists", introfn, ast_fileexists(introfn, NULL, NULL) > 0 ? "Exists" : "Ain't Exists", vmu->mailbox);
 
 	make_email_file(p, myserveremail, vmu, msgnum, vmu->context, vmu->mailbox, S_OR(chan->cid.cid_num, NULL), S_OR(chan->cid.cid_name, NULL), fn, introfn, fmt, duration, 1, chan, NULL, 1, flag);
 	/* read mail file to memory */		
@@ -2620,6 +2623,7 @@
 		if (!newlen) {
 			return -1;
 		}
+		ast_log(LOG_NOTICE, "Hey, I found something and will be writing it to %s.%s\n", fn, format);
 		write_file(filename, (char *) body_decoded, newlen);
 	} else {
 		ast_debug(5, "Body of message is NULL.\n");




More information about the asterisk-commits mailing list