Re: [PATCH 1/2] Add Google Inc. to AUTHORS as a contributor.
[notmuch-archives.git] / 4c / 442eb77b73707747e22518928e83e9ee8b9b55
1 Return-Path: <david@tethera.net>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5  by arlo.cworth.org (Postfix) with ESMTP id 2B2346DE00F5\r
6  for <notmuch@notmuchmail.org>; Thu, 14 Jul 2016 06:59:31 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.011\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.011 tagged_above=-999 required=5 tests=[AWL=0.000,\r
12   SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled\r
13 Received: from arlo.cworth.org ([127.0.0.1])\r
14  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
15  with ESMTP id cpx5awkS2bQF for <notmuch@notmuchmail.org>;\r
16  Thu, 14 Jul 2016 06:59:23 -0700 (PDT)\r
17 Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197])\r
18  by arlo.cworth.org (Postfix) with ESMTPS id 5F8806DE00C9\r
19  for <notmuch@notmuchmail.org>; Thu, 14 Jul 2016 06:59:23 -0700 (PDT)\r
20 Received: from remotemail by fethera.tethera.net with local (Exim 4.84)\r
21  (envelope-from <david@tethera.net>)\r
22  id 1bNhAF-0003Em-TD; Thu, 14 Jul 2016 09:58:55 -0400\r
23 Received: (nullmailer pid 5991 invoked by uid 1000);\r
24  Thu, 14 Jul 2016 13:59:15 -0000\r
25 From: David Bremner <david@tethera.net>\r
26 To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>,\r
27  Notmuch Mail <notmuch@notmuchmail.org>\r
28 Subject: Re: [PATCH v4 09/16] index encrypted parts when asked.\r
29 In-Reply-To: <1467970047-8013-10-git-send-email-dkg@fifthhorseman.net>\r
30 References: <1467970047-8013-1-git-send-email-dkg@fifthhorseman.net>\r
31  <1467970047-8013-10-git-send-email-dkg@fifthhorseman.net>\r
32 User-Agent: Notmuch/0.22+28~gb9bf3f4 (http://notmuchmail.org) Emacs/24.5.1\r
33  (x86_64-pc-linux-gnu)\r
34 Date: Thu, 14 Jul 2016 10:59:15 -0300\r
35 Message-ID: <87lh14e2x8.fsf@tesseract.cs.unb.ca>\r
36 MIME-Version: 1.0\r
37 Content-Type: text/plain\r
38 X-BeenThere: notmuch@notmuchmail.org\r
39 X-Mailman-Version: 2.1.20\r
40 Precedence: list\r
41 List-Id: "Use and development of the notmuch mail system."\r
42  <notmuch.notmuchmail.org>\r
43 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
44  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
46 List-Post: <mailto:notmuch@notmuchmail.org>\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
48 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
49  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
50 X-List-Received-Date: Thu, 14 Jul 2016 13:59:31 -0000\r
51 \r
52 Daniel Kahn Gillmor <dkg@fifthhorseman.net> writes:\r
53 \r
54 > +    status = _notmuch_crypto_get_gmime_ctx_for_protocol (&(indexopts->crypto),\r
55 > +                                                      protocol, &crypto_ctx);\r
56 > +    if (status) {\r
57 > +     _notmuch_database_log (notmuch, "Warning: setup failed for decrypting "\r
58 > +                            "during indexing. (%d)\n", status);\r
59 > +     status = notmuch_message_add_property (message, "index-decryption", "failure");\r
60 > +     if (status)\r
61 > +         _notmuch_database_log (notmuch, "failed to add index-decryption "\r
62 > +                                "property (%d)\n", status);\r
63 > +     return;\r
64 > +    }\r
65 \r
66 Currently the only correct usage of _notmuch_database_log is the\r
67 following pattern\r
68 \r
69           _notmuch_database_log (notmuch, "Cannot write to a read-only database.\n");\r
70           return NOTMUCH_STATUS_READ_ONLY_DATABASE;\r
71 \r
72 In particular, the log buffer is only one line, and the caller needs to\r
73 know to retrieve it.\r
74 \r
75 I agree it's not ideal, but I doubt you want to delay your stuff in\r
76 order to extend/fix the internal logging API.\r
77 \r
78 \r
79 d\r