[asterisk-commits] file: trunk r56005 - /trunk/apps/app_voicemail.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Feb 21 17:05:01 MST 2007


Author: file
Date: Wed Feb 21 18:05:00 2007
New Revision: 56005

URL: http://svn.digium.com/view/asterisk?view=rev&rev=56005
Log:
Make filename on email follow subject message number, purely for cosmetic purposes for individuals like *cough* jsmith *cough*. (issue #9111 reported by sshah)

Modified:
    trunk/apps/app_voicemail.c

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=56005&r1=56004&r2=56005
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Wed Feb 21 18:05:00 2007
@@ -1970,7 +1970,7 @@
 	fprintf(p, "MIME-Version: 1.0\r\n");
 	if (attach_user_voicemail) {
 		/* Something unique. */
-		snprintf(bound, sizeof(bound), "voicemail_%d%s%d%d", msgnum, mailbox, getpid(), (unsigned int)ast_random());
+		snprintf(bound, sizeof(bound), "voicemail_%d%s%d%d", msgnum + 1, mailbox, getpid(), (unsigned int)ast_random());
 
 		fprintf(p, "Content-Type: multipart/mixed; boundary=\"%s\"\r\n\r\n\r\n", bound);
 
@@ -2018,19 +2018,19 @@
 				ast_log(LOG_DEBUG, "VOLGAIN: Stored at: %s.%s - Level: %.4f - Mailbox: %s\n", attach, format, vmu->volgain, mailbox);
 		}
 		fprintf(p, "--%s\r\n", bound);
-		fprintf(p, "Content-Type: %s%s; name=\"msg%04d.%s\"\r\n", ctype, format, msgnum, format);
+		fprintf(p, "Content-Type: %s%s; name=\"msg%04d.%s\"\r\n", ctype, format, msgnum + 1, format);
 		fprintf(p, "Content-Transfer-Encoding: base64\r\n");
 		fprintf(p, "Content-Description: Voicemail sound attachment.\r\n");
-		fprintf(p, "Content-Disposition: attachment; filename=\"msg%04d.%s\"\r\n\r\n", msgnum, format);
+		fprintf(p, "Content-Disposition: attachment; filename=\"msg%04d.%s\"\r\n\r\n", msgnum + 1, format);
 		snprintf(fname, sizeof(fname), "%s.%s", attach, format);
 		base_encode(fname, p);
 		/* only attach if necessary */
 		if (imap && !strcmp(format, "gsm")) {
 			fprintf(p, "--%s\r\n", bound);
-			fprintf(p, "Content-Type: audio/x-gsm; name=\"msg%04d.%s\"\r\n", msgnum, format);
+			fprintf(p, "Content-Type: audio/x-gsm; name=\"msg%04d.%s\"\r\n", msgnum + 1, format);
 			fprintf(p, "Content-Transfer-Encoding: base64\r\n");
 			fprintf(p, "Content-Description: Voicemail sound attachment.\r\n");
-			fprintf(p, "Content-Disposition: attachment; filename=\"msg%04d.gsm\"\r\n\r\n", msgnum);
+			fprintf(p, "Content-Disposition: attachment; filename=\"msg%04d.gsm\"\r\n\r\n", msgnum + 1);
 			snprintf(fname, sizeof(fname), "%s.gsm", attach);
 			base_encode(fname, p);
 		}



More information about the asterisk-commits mailing list