summaryrefslogtreecommitdiffstats
path: root/mailnews/mime/src/mimemsg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mailnews/mime/src/mimemsg.cpp')
-rw-r--r--mailnews/mime/src/mimemsg.cpp42
1 files changed, 15 insertions, 27 deletions
diff --git a/mailnews/mime/src/mimemsg.cpp b/mailnews/mime/src/mimemsg.cpp
index 2d6957069..d024a7725 100644
--- a/mailnews/mime/src/mimemsg.cpp
+++ b/mailnews/mime/src/mimemsg.cpp
@@ -786,34 +786,22 @@ MimeMessage_write_headers_html (MimeObject *obj)
return status;
}
- if (!msg->crypto_stamped_p)
- {
- /* If we're not writing a xlation stamp, and this is the outermost
- message, then now is the time to run the post_header_html_fn.
- (Otherwise, it will be run when the xlation-stamp is finally
- closed off, in MimeXlateed_emit_buffered_child() or
- MimeMultipartSigned_emit_child().)
- */
- if (obj->options &&
- obj->options->state &&
+ // If this is the outermost message, then now is the time to run the
+ // post_header_html_fn.
+ if (obj->options && obj->options->state &&
obj->options->generate_post_header_html_fn &&
- !obj->options->state->post_header_html_run_p)
- {
- char *html = 0;
- PR_ASSERT(obj->options->state->first_data_written_p);
- html = obj->options->generate_post_header_html_fn(NULL,
- obj->options->html_closure,
- msg->hdrs);
- obj->options->state->post_header_html_run_p = true;
- if (html)
- {
- status = MimeObject_write(obj, html, strlen(html), false);
- PR_Free(html);
- if (status < 0)
- {
- mimeEmitterEndHeader(obj->options, obj);
- return status;
- }
+ !obj->options->state->post_header_html_run_p) {
+ char *html = 0;
+ PR_ASSERT(obj->options->state->first_data_written_p);
+ html = obj->options->generate_post_header_html_fn(
+ NULL, obj->options->html_closure, msg->hdrs);
+ obj->options->state->post_header_html_run_p = true;
+ if (html) {
+ status = MimeObject_write(obj, html, strlen(html), false);
+ PR_Free(html);
+ if (status < 0) {
+ mimeEmitterEndHeader(obj->options, obj);
+ return status;
}
}
}