Bug 1240290 - Follow-up: Reformat. rs=reformat DONTBUILD
This commit is contained in:
Родитель
523bdf8a20
Коммит
11202b91d7
|
@ -153,8 +153,7 @@ bool MimeEncOrMP_CMS_signed_p(MimeObject *obj) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MimeAnyParentCMSEncrypted(MimeObject *obj)
|
bool MimeAnyParentCMSEncrypted(MimeObject *obj) {
|
||||||
{
|
|
||||||
MimeObject *o2 = obj;
|
MimeObject *o2 = obj;
|
||||||
while (o2 && o2->parent) {
|
while (o2 && o2->parent) {
|
||||||
if (MimeEncryptedCMS_encrypted_p(o2->parent)) {
|
if (MimeEncryptedCMS_encrypted_p(o2->parent)) {
|
||||||
|
@ -165,8 +164,7 @@ bool MimeAnyParentCMSEncrypted(MimeObject *obj)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MimeAnyParentCMSSigned(MimeObject *obj)
|
bool MimeAnyParentCMSSigned(MimeObject *obj) {
|
||||||
{
|
|
||||||
MimeObject *o2 = obj;
|
MimeObject *o2 = obj;
|
||||||
while (o2 && o2->parent) {
|
while (o2 && o2->parent) {
|
||||||
if (MimeEncOrMP_CMS_signed_p(o2->parent)) {
|
if (MimeEncOrMP_CMS_signed_p(o2->parent)) {
|
||||||
|
@ -539,7 +537,7 @@ static int MimeCMS_write(const char *buf, int32_t buf_size, void *closure) {
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
|
|
||||||
if (!data || !data->output_fn || !data->decoder_context) return -1;
|
if (!data || !data->output_fn || !data->decoder_context) return -1;
|
||||||
|
|
||||||
if (!data->decoding_failed && !data->skip_content) {
|
if (!data->decoding_failed && !data->skip_content) {
|
||||||
PR_SetError(0, 0);
|
PR_SetError(0, 0);
|
||||||
rv = data->decoder_context->Update(buf, buf_size);
|
rv = data->decoder_context->Update(buf, buf_size);
|
||||||
|
@ -648,11 +646,13 @@ static int MimeCMS_eof(void *crypto_closure, bool abort_p) {
|
||||||
// with a bad status.
|
// with a bad status.
|
||||||
if (data->any_parent_is_signed_p) {
|
if (data->any_parent_is_signed_p) {
|
||||||
data->smimeHeaderSink->SignedStatus(aRelativeNestLevel,
|
data->smimeHeaderSink->SignedStatus(aRelativeNestLevel,
|
||||||
nsICMSMessageErrors::GENERAL_ERROR, nullptr, data->url);
|
nsICMSMessageErrors::GENERAL_ERROR,
|
||||||
|
nullptr, data->url);
|
||||||
}
|
}
|
||||||
if (data->any_parent_is_encrypted_p) {
|
if (data->any_parent_is_encrypted_p) {
|
||||||
data->smimeHeaderSink->EncryptionStatus(aRelativeNestLevel,
|
data->smimeHeaderSink->EncryptionStatus(
|
||||||
nsICMSMessageErrors::GENERAL_ERROR, nullptr, data->url);
|
aRelativeNestLevel, nsICMSMessageErrors::GENERAL_ERROR, nullptr,
|
||||||
|
data->url);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -352,8 +352,7 @@ static int MimeEncrypted_emit_buffered_child(MimeObject *obj) {
|
||||||
*/
|
*/
|
||||||
if (enc->crypto_closure && obj->options &&
|
if (enc->crypto_closure && obj->options &&
|
||||||
obj->options->headers != MimeHeadersCitation &&
|
obj->options->headers != MimeHeadersCitation &&
|
||||||
obj->options->write_html_p && obj->options->output_fn)
|
obj->options->write_html_p && obj->options->output_fn) {
|
||||||
{
|
|
||||||
/* Now that we have written out the crypto stamp, the outermost header
|
/* Now that we have written out the crypto stamp, the outermost header
|
||||||
block is well and truly closed. If this is in fact the outermost
|
block is well and truly closed. If this is in fact the outermost
|
||||||
message, then run the post_header_html_fn now.
|
message, then run the post_header_html_fn now.
|
||||||
|
|
|
@ -208,7 +208,8 @@ static bool MimeExternalObject_displayable_inline_p(MimeObjectClass *clazz,
|
||||||
MimeDefClass(MimeSuppressedCrypto, MimeSuppressedCryptoClass,
|
MimeDefClass(MimeSuppressedCrypto, MimeSuppressedCryptoClass,
|
||||||
mimeSuppressedCryptoClass, &MIME_SUPERCLASS);
|
mimeSuppressedCryptoClass, &MIME_SUPERCLASS);
|
||||||
|
|
||||||
static int MimeSuppressedCryptoClassInitialize(MimeSuppressedCryptoClass *clazz) {
|
static int MimeSuppressedCryptoClassInitialize(
|
||||||
|
MimeSuppressedCryptoClass *clazz) {
|
||||||
MimeExternalObjectClass *lclass = (MimeExternalObjectClass *)clazz;
|
MimeExternalObjectClass *lclass = (MimeExternalObjectClass *)clazz;
|
||||||
return MimeExternalObjectClassInitialize(lclass);
|
return MimeExternalObjectClassInitialize(lclass);
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,6 @@ struct MimeExternalObject {
|
||||||
#define MimeExternalObjectClassInitializer(ITYPE, CSUPER) \
|
#define MimeExternalObjectClassInitializer(ITYPE, CSUPER) \
|
||||||
{ MimeLeafClassInitializer(ITYPE, CSUPER) }
|
{ MimeLeafClassInitializer(ITYPE, CSUPER) }
|
||||||
|
|
||||||
|
|
||||||
typedef struct MimeSuppressedCryptoClass MimeSuppressedCryptoClass;
|
typedef struct MimeSuppressedCryptoClass MimeSuppressedCryptoClass;
|
||||||
typedef struct MimeSuppressedCrypto MimeSuppressedCrypto;
|
typedef struct MimeSuppressedCrypto MimeSuppressedCrypto;
|
||||||
|
|
||||||
|
@ -48,5 +47,4 @@ struct MimeSuppressedCrypto {
|
||||||
#define MimeSuppressedCryptoClassInitializer(ITYPE, CSUPER) \
|
#define MimeSuppressedCryptoClassInitializer(ITYPE, CSUPER) \
|
||||||
{ MimeExternalObjectClassInitializer(ITYPE, CSUPER) }
|
{ MimeExternalObjectClassInitializer(ITYPE, CSUPER) }
|
||||||
|
|
||||||
|
|
||||||
#endif /* _MIMEEOBJ_H_ */
|
#endif /* _MIMEEOBJ_H_ */
|
||||||
|
|
|
@ -654,7 +654,7 @@ static int MimeMultipartSigned_emit_child(MimeObject *obj) {
|
||||||
|
|
||||||
if (mime_typep(body, (MimeObjectClass *)&mimeSuppressedCryptoClass)) {
|
if (mime_typep(body, (MimeObjectClass *)&mimeSuppressedCryptoClass)) {
|
||||||
((MimeMultipartSignedClass *)obj->clazz)
|
((MimeMultipartSignedClass *)obj->clazz)
|
||||||
->crypto_notify_suppressed_child(sig->crypto_closure);
|
->crypto_notify_suppressed_child(sig->crypto_closure);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MIME_DRAFTS
|
#ifdef MIME_DRAFTS
|
||||||
|
|
Загрузка…
Ссылка в новой задаче