From: Naveen Albert Date: Tue, 24 Sep 2024 11:44:25 +0000 (-0400) Subject: app_voicemail: Fix ill-formatted pager emails with custom subject. X-Git-Tag: 20.11.0-rc1~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4f28e30e2bae32f3859d8910f1c30f53b836b85;p=thirdparty%2Fasterisk.git app_voicemail: Fix ill-formatted pager emails with custom subject. Add missing end-of-headers newline to pager emails with custom subjects, since this was missing from this code path. Resolves: #902 (cherry picked from commit eb624a5aa23ec89eb7d1972cec409d295c98b25e) --- diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 904fddb07b..72cae2cc65 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -6040,12 +6040,15 @@ static int sendpage(char *srcemail, char *pager, int msgnum, char *context, char } } else { if (ast_strlen_zero(flag)) { - fprintf(p, "Subject: New VM\n\n"); + fprintf(p, "Subject: New VM" ENDL); } else { - fprintf(p, "Subject: New %s VM\n\n", flag); + fprintf(p, "Subject: New %s VM" ENDL, flag); } } + /* End of headers */ + fputs(ENDL, p); + if (pagerbody) { struct ast_channel *ast; if ((ast = ast_dummy_channel_alloc())) {