app_voicemail: Fix ill-formatted pager emails with custom subject.#903
Merged
asterisk-org-access-app[bot] merged 1 commit intoSep 25, 2024
Merged
Conversation
Contributor
Author
|
cherry-pick-to: 18 |
Contributor
|
I propose a slightly different approach that also normalizes the EOL characters when a custom subject is not present. It's easier to include the whole patch than to explain it: diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index a15470e0f2..f54007c5fd 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -6033,12 +6033,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())) { |
Add missing end-of-headers newline to pager emails with custom subjects, since this was missing from this code path. Resolves: asterisk#902
78d1a56 to
e54c3a1
Compare
seanbright
approved these changes
Sep 24, 2024
jcolp
approved these changes
Sep 25, 2024
|
Successfully merged to branch master and cherry-picked to ["18","20","21","22"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add missing end-of-headers newline to pager emails with custom subjects, since this was missing from this code path.
Resolves: #902