From 70d68728428c88429514253fc491488b4e3f1e0a Mon Sep 17 00:00:00 2001 From: David Bremner Date: Fri, 15 Jul 2016 10:59:15 +2100 Subject: [PATCH] Re: [PATCH v4 09/16] index encrypted parts when asked. --- 4c/442eb77b73707747e22518928e83e9ee8b9b55 | 79 +++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 4c/442eb77b73707747e22518928e83e9ee8b9b55 diff --git a/4c/442eb77b73707747e22518928e83e9ee8b9b55 b/4c/442eb77b73707747e22518928e83e9ee8b9b55 new file mode 100644 index 000000000..597554018 --- /dev/null +++ b/4c/442eb77b73707747e22518928e83e9ee8b9b55 @@ -0,0 +1,79 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 2B2346DE00F5 + for ; Thu, 14 Jul 2016 06:59:31 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.011 +X-Spam-Level: +X-Spam-Status: No, score=-0.011 tagged_above=-999 required=5 tests=[AWL=0.000, + SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] 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 cpx5awkS2bQF for ; + Thu, 14 Jul 2016 06:59:23 -0700 (PDT) +Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) + by arlo.cworth.org (Postfix) with ESMTPS id 5F8806DE00C9 + for ; Thu, 14 Jul 2016 06:59:23 -0700 (PDT) +Received: from remotemail by fethera.tethera.net with local (Exim 4.84) + (envelope-from ) + id 1bNhAF-0003Em-TD; Thu, 14 Jul 2016 09:58:55 -0400 +Received: (nullmailer pid 5991 invoked by uid 1000); + Thu, 14 Jul 2016 13:59:15 -0000 +From: David Bremner +To: Daniel Kahn Gillmor , + Notmuch Mail +Subject: Re: [PATCH v4 09/16] index encrypted parts when asked. +In-Reply-To: <1467970047-8013-10-git-send-email-dkg@fifthhorseman.net> +References: <1467970047-8013-1-git-send-email-dkg@fifthhorseman.net> + <1467970047-8013-10-git-send-email-dkg@fifthhorseman.net> +User-Agent: Notmuch/0.22+28~gb9bf3f4 (http://notmuchmail.org) Emacs/24.5.1 + (x86_64-pc-linux-gnu) +Date: Thu, 14 Jul 2016 10:59:15 -0300 +Message-ID: <87lh14e2x8.fsf@tesseract.cs.unb.ca> +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +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, 14 Jul 2016 13:59:31 -0000 + +Daniel Kahn Gillmor writes: + +> + 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 (notmuch, "failed to add index-decryption " +> + "property (%d)\n", status); +> + return; +> + } + +Currently the only correct usage of _notmuch_database_log is the +following pattern + + _notmuch_database_log (notmuch, "Cannot write to a read-only database.\n"); + return NOTMUCH_STATUS_READ_ONLY_DATABASE; + +In particular, the log buffer is only one line, and the caller needs to +know to retrieve it. + +I agree it's not ideal, but I doubt you want to delay your stuff in +order to extend/fix the internal logging API. + + +d -- 2.26.2