Don't reuse the part that we've signed and/or encrypted, create a new part

2002-09-27  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer.c (build_message): Don't reuse the part that
	we've signed and/or encrypted, create a new part container
	instead. Fixes bug #31379.

svn path=/trunk/; revision=18257
This commit is contained in:
Jeffrey Stedfast
2002-09-28 02:45:50 +00:00
committed by Jeffrey Stedfast
parent 6ae54a6e1f
commit bb3273ae2f
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2002-09-27 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer.c (build_message): Don't reuse the part that
we've signed and/or encrypted, create a new part container
instead. Fixes bug #31379.
2002-09-25 Dan Winship <danw@ximian.com>
* e-msg-composer-hdrs.c (create_headers): Use "mail/*" for the

View File

@ -526,6 +526,7 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data)
mps = camel_multipart_signed_new ();
camel_multipart_signed_sign (mps, cipher, part, userid, CAMEL_CIPHER_HASH_SHA1, &ex);
camel_object_unref (cipher);
camel_object_unref (part);
if (from)
camel_object_unref (from);
@ -539,6 +540,7 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data)
goto exception;
}
} else {
part = camel_mime_part_new ();
camel_multipart_set_boundary (CAMEL_MULTIPART (mps), NULL);
camel_medium_set_content_object (CAMEL_MEDIUM (part), (CamelDataWrapper *) mps);
}
@ -599,8 +601,8 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data)
cipher = mail_crypto_get_pgp_cipher_context (hdrs->account);
camel_multipart_encrypted_encrypt (mpe, part, cipher, userid, recipients, &ex);
camel_object_unref (cipher);
camel_object_unref (part);
if (from)
camel_object_unref (from);
@ -618,6 +620,7 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data)
goto exception;
}
} else {
part = camel_mime_part_new ();
camel_multipart_set_boundary (CAMEL_MULTIPART (mpe), NULL);
camel_medium_set_content_object (CAMEL_MEDIUM (part), (CamelDataWrapper *) mpe);
}