[gmime] Fixed the build
- From: Jeffrey Stedfast <fejj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gmime] Fixed the build
- Date: Thu, 16 Mar 2017 11:46:59 +0000 (UTC)
commit d051e3936766bdcd00c1010568bc53202c7acfdc
Author: Jeffrey Stedfast <jestedfa microsoft com>
Date: Thu Mar 16 07:46:31 2017 -0400
Fixed the build
gmime/gmime-multipart-encrypted.c | 16 ++++++++--------
gmime/gmime-multipart-signed.c | 10 +++++-----
2 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/gmime/gmime-multipart-encrypted.c b/gmime/gmime-multipart-encrypted.c
index 1f5d2ef..7918325 100644
--- a/gmime/gmime-multipart-encrypted.c
+++ b/gmime/gmime-multipart-encrypted.c
@@ -271,13 +271,13 @@ g_mime_multipart_encrypted_decrypt (GMimeMultipartEncrypted *encrypted, GMimeDec
GMimeObject *decrypted, *version_part, *encrypted_part;
GMimeStream *filtered, *stream, *ciphertext;
const char *protocol, *supported;
- GMimeContentType *mime_type;
+ GMimeContentType *content_type;
GMimeDataWrapper *content;
GMimeDecryptResult *res;
GMimeCryptoContext *ctx;
GMimeFilter *filter;
GMimeParser *parser;
- char *content_type;
+ char *mime_type;
g_return_val_if_fail (GMIME_IS_MULTIPART_ENCRYPTED (encrypted), NULL);
@@ -314,22 +314,22 @@ g_mime_multipart_encrypted_decrypt (GMimeMultipartEncrypted *encrypted, GMimeDec
version_part = g_mime_multipart_get_part ((GMimeMultipart *) encrypted,
GMIME_MULTIPART_ENCRYPTED_VERSION);
/* make sure the protocol matches the version part's content-type */
- content_type = g_mime_content_type_to_string (version_part->content_type);
- if (g_ascii_strcasecmp (content_type, protocol) != 0) {
+ mime_type = g_mime_content_type_get_mime_type (version_part->content_type);
+ if (g_ascii_strcasecmp (mime_type, protocol) != 0) {
g_set_error_literal (err, GMIME_ERROR, GMIME_ERROR_PARSE_ERROR,
_("Cannot decrypt multipart/encrypted part: content-type does not match
protocol."));
- g_free (content_type);
g_object_unref (ctx);
+ g_free (mime_type);
return NULL;
}
- g_free (content_type);
+ g_free (mime_type);
/* get the encrypted part and check that it is of type application/octet-stream */
encrypted_part = g_mime_multipart_get_part ((GMimeMultipart *) encrypted,
GMIME_MULTIPART_ENCRYPTED_CONTENT);
- mime_type = g_mime_object_get_content_type (encrypted_part);
- if (!g_mime_content_type_is_type (mime_type, "application", "octet-stream")) {
+ content_type = g_mime_object_get_content_type (encrypted_part);
+ if (!g_mime_content_type_is_type (content_type, "application", "octet-stream")) {
g_set_error_literal (err, GMIME_ERROR, GMIME_ERROR_PARSE_ERROR,
_("Cannot decrypt multipart/encrypted part: unexpected content type."));
g_object_unref (ctx);
diff --git a/gmime/gmime-multipart-signed.c b/gmime/gmime-multipart-signed.c
index 3aa0c08..27ac057 100644
--- a/gmime/gmime-multipart-signed.c
+++ b/gmime/gmime-multipart-signed.c
@@ -376,7 +376,7 @@ g_mime_multipart_signed_verify (GMimeMultipartSigned *mps, GMimeVerifyFlags flag
GMimeFilter *crlf_filter;
GMimeCryptoContext *ctx;
GMimeDigestAlgo digest;
- char *content_type;
+ char *mime_type;
g_return_val_if_fail (GMIME_IS_MULTIPART_SIGNED (mps), NULL);
@@ -416,16 +416,16 @@ g_mime_multipart_signed_verify (GMimeMultipartSigned *mps, GMimeVerifyFlags flag
signature = g_mime_multipart_get_part (GMIME_MULTIPART (mps), GMIME_MULTIPART_SIGNED_SIGNATURE);
/* make sure the protocol matches the signature content-type */
- content_type = g_mime_content_type_to_string (signature->content_type);
- if (g_ascii_strcasecmp (content_type, protocol) != 0) {
+ mime_type = g_mime_content_type_get_mime_type (signature->content_type);
+ if (g_ascii_strcasecmp (mime_type, protocol) != 0) {
g_set_error_literal (err, GMIME_ERROR, GMIME_ERROR_PARSE_ERROR,
_("Cannot verify multipart/signed part: signature content-type does not
match protocol."));
- g_free (content_type);
g_object_unref (ctx);
+ g_free (mime_type);
return NULL;
}
- g_free (content_type);
+ g_free (mime_type);
content = g_mime_multipart_get_part (GMIME_MULTIPART (mps), GMIME_MULTIPART_SIGNED_CONTENT);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]