From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 3899F6DE13F0 for ; Wed, 1 May 2019 22:17:13 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.133 X-Spam-Level: X-Spam-Status: No, score=-0.133 tagged_above=-999 required=5 tests=[AWL=0.068, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NYa-fVQz1wQ2 for ; Wed, 1 May 2019 22:17:11 -0700 (PDT) Received: from che.mayfirst.org (che.mayfirst.org [162.247.75.118]) by arlo.cworth.org (Postfix) with ESMTPS id D64FD6DE0F66 for ; Wed, 1 May 2019 22:17:10 -0700 (PDT) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019; t=1556774229; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : from; bh=/OwqNBxQsOKAfwmALjofcXYm7xbDSl5OxS86M12YKJw=; b=+nK53s3sy0dWwMPmWBIN773emSA4MIswKnDddU3d/lqVdBSrov9NHjex 4HBdb9NwG9gUhHO7f2hn0utqwNgUCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019rsa; t=1556774228; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : from; bh=/OwqNBxQsOKAfwmALjofcXYm7xbDSl5OxS86M12YKJw=; b=QTwubM4hEoeYrTZ5fmC0pM0202AMa41L4u5JjjJovF13dfT26ZksqyoE NMxpwAxMfFpi7/EFBU1U/+CxsXBiAdvxycZmlBytFalILhF9UT5s51rb9c C+yJfrjNXcw5cOvas99E8VNE3fr9wEbx86ufsbbqFeyeGmOcEJMYSJiACT 05LON7gMdSP5e3/sT8oZdmB53x8Kp38XwaD3cea1a5xb/mwk5rNAdtaljl 9gsysiVLNMEfgnzaaqKjZNZRmxEZG4gexxtxfYS+KtTyK1/smTRdiYhq6u lJlPgn5aq9lWiJJbfTSlgU6wAuyLkFaZx2lxrIVlB6jzSeepr7Qk4w== Received: from fifthhorseman.net (ool-6c3a0662.static.optonline.net [108.58.6.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by che.mayfirst.org (Postfix) with ESMTPSA id AF053F9A1 for ; Thu, 2 May 2019 01:17:07 -0400 (EDT) Received: by fifthhorseman.net (Postfix, from userid 1000) id 3C7EB1FE1D; Thu, 2 May 2019 01:17:04 -0400 (EDT) From: Daniel Kahn Gillmor To: Notmuch Mail Subject: [PATCH 01/16] gmime-cleanup: drop unused gmime 2.6 content_type from _index_encrypted_mime_part Date: Thu, 2 May 2019 01:16:38 -0400 Message-Id: <20190502051653.8502-2-dkg@fifthhorseman.net> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190502051653.8502-1-dkg@fifthhorseman.net> References: <20190501104643.5836-1-david@tethera.net> <20190502051653.8502-1-dkg@fifthhorseman.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 May 2019 05:17:13 -0000 Signed-off-by: Daniel Kahn Gillmor --- lib/index.cc | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/lib/index.cc b/lib/index.cc index efd9da4c..0e98984c 100644 --- a/lib/index.cc +++ b/lib/index.cc @@ -367,7 +367,6 @@ _index_content_type (notmuch_message_t *message, GMimeObject *part) static void _index_encrypted_mime_part (notmuch_message_t *message, notmuch_indexopts_t *indexopts, - GMimeContentType *content_type, GMimeMultipartEncrypted *part); /* Callback to generate terms for each mime part of a message. */ @@ -392,7 +391,6 @@ _index_mime_part (notmuch_message_t *message, } _index_content_type (message, part); - content_type = g_mime_object_get_content_type (part); if (GMIME_IS_MULTIPART (part)) { GMimeMultipart *multipart = GMIME_MULTIPART (part); @@ -421,7 +419,6 @@ _index_mime_part (notmuch_message_t *message, g_mime_multipart_get_part (multipart, i)); if (i == GMIME_MULTIPART_ENCRYPTED_CONTENT) { _index_encrypted_mime_part(message, indexopts, - content_type, GMIME_MULTIPART_ENCRYPTED (part)); } else { if (i != GMIME_MULTIPART_ENCRYPTED_VERSION) { @@ -476,6 +473,7 @@ _index_mime_part (notmuch_message_t *message, filter = g_mime_stream_filter_new (stream); + content_type = g_mime_object_get_content_type (part); discard_non_term_filter = notmuch_filter_discard_non_term_new (content_type); g_mime_stream_filter_add (GMIME_STREAM_FILTER (filter), @@ -518,7 +516,6 @@ _index_mime_part (notmuch_message_t *message, static void _index_encrypted_mime_part (notmuch_message_t *message, notmuch_indexopts_t *indexopts, - g_mime_3_unused(GMimeContentType *content_type), GMimeMultipartEncrypted *encrypted_data) { notmuch_status_t status; @@ -532,23 +529,6 @@ _index_encrypted_mime_part (notmuch_message_t *message, notmuch = notmuch_message_get_database (message); GMimeCryptoContext* crypto_ctx = NULL; -#if (GMIME_MAJOR_VERSION < 3) - { - const char *protocol = NULL; - protocol = g_mime_content_type_get_parameter (content_type, "protocol"); - status = _notmuch_crypto_get_gmime_ctx_for_protocol (&(indexopts->crypto), - protocol, &crypto_ctx); - if (status) { - _notmuch_database_log (notmuch, "Warning: setup failed for decrypting " - "during indexing. (%d)\n", status); - status = notmuch_message_add_property (message, "index.decryption", "failure"); - if (status) - _notmuch_database_log_append (notmuch, "failed to add index.decryption " - "property (%d)\n", status); - return; - } - } -#endif bool attempted = false; GMimeDecryptResult *decrypt_result = NULL; bool get_sk = (HAVE_GMIME_SESSION_KEYS && notmuch_indexopts_get_decrypt_policy (indexopts) == NOTMUCH_DECRYPT_TRUE); -- 2.20.1