Match filename between content-disposition and content-type
authorMark Spencer <markster@digium.com>
Mon, 17 Nov 2003 06:16:41 +0000 (06:16 +0000)
committerMark Spencer <markster@digium.com>
Mon, 17 Nov 2003 06:16:41 +0000 (06:16 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1757 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index 2ad6de7..a030b72 100755 (executable)
@@ -741,7 +741,7 @@ static int sendmail(char *srcemail, struct ast_vm_user *vmu, int msgnum, char *m
                }
                if (attach_user_voicemail) {
                        fprintf(p, "--%s\n", bound);
                }
                if (attach_user_voicemail) {
                        fprintf(p, "--%s\n", bound);
-                       fprintf(p, "Content-Type: audio/x-%s; name=\"msg%04d.%s\"\n", format, msgnum + 1, format);
+                       fprintf(p, "Content-Type: audio/x-%s; name=\"msg%04d.%s\"\n", format, msgnum, format);
                        fprintf(p, "Content-Transfer-Encoding: BASE64\n");
                        fprintf(p, "Content-Description: Voicemail sound attachment.\n");
                        fprintf(p, "Content-Disposition: attachment; filename=\"msg%04d.%s\"\n\n", msgnum, format);
                        fprintf(p, "Content-Transfer-Encoding: BASE64\n");
                        fprintf(p, "Content-Description: Voicemail sound attachment.\n");
                        fprintf(p, "Content-Disposition: attachment; filename=\"msg%04d.%s\"\n\n", msgnum, format);