Re: [PATCH v4 08/16] reorganize indexing of multipart/signed and multipart/encrypted
[notmuch-archives.git] / 6e / 104a396209aa8795f7249430a63ee671d4322d
1 Return-Path: <jrollins@finestructure.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 olra.theworths.org (Postfix) with ESMTP id DB8CA431FB6\r
6         for <notmuch@notmuchmail.org>; Fri, 18 May 2012 13:42:17 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -2.29\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.29 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_MED=-2.3, T_MIME_NO_TEXT=0.01] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id LXdjAWI1rv2x for <notmuch@notmuchmail.org>;\r
16         Fri, 18 May 2012 13:42:16 -0700 (PDT)\r
17 Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu\r
18         [131.215.239.19])\r
19         by olra.theworths.org (Postfix) with ESMTP id 39AE7431FAE\r
20         for <notmuch@notmuchmail.org>; Fri, 18 May 2012 13:42:16 -0700 (PDT)\r
21 Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1])\r
22         by fire-doxen-postvirus (Postfix) with ESMTP id A63332E50B63;\r
23         Fri, 18 May 2012 13:42:15 -0700 (PDT)\r
24 X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new\r
25 Received: from finestructure.net (rrcs-24-103-26-131.nyc.biz.rr.com\r
26         [24.103.26.131]) (Authenticated sender: jrollins)\r
27         by fire-doxen-submit (Postfix) with ESMTP id D018D32806F;\r
28         Fri, 18 May 2012 13:42:12 -0700 (PDT)\r
29 Received: by finestructure.net (Postfix, from userid 1000)\r
30         id A8EBF4AD; Fri, 18 May 2012 13:42:11 -0700 (PDT)\r
31 From: Jameson Graef Rollins <jrollins@finestructure.net>\r
32 To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>,\r
33         Notmuch Mail <notmuch@notmuchmail.org>\r
34 Subject: Re: [PATCH v2 5/5] cli: lazily create the crypto gpg context only\r
35         when needed\r
36 In-Reply-To: <4FB6B2F5.6090105@fifthhorseman.net>\r
37 References: <1337362357-31281-1-git-send-email-jrollins@finestructure.net>\r
38         <1337362357-31281-2-git-send-email-jrollins@finestructure.net>\r
39         <1337362357-31281-3-git-send-email-jrollins@finestructure.net>\r
40         <1337362357-31281-4-git-send-email-jrollins@finestructure.net>\r
41         <1337362357-31281-5-git-send-email-jrollins@finestructure.net>\r
42         <1337362357-31281-6-git-send-email-jrollins@finestructure.net>\r
43         <20120518192157.GV11804@mit.edu>\r
44         <87txzd9su3.fsf@servo.finestructure.net>\r
45         <4FB6B2F5.6090105@fifthhorseman.net>\r
46 User-Agent: Notmuch/0.12+183~g9d5ff3c (http://notmuchmail.org) Emacs/23.4.1\r
47         (x86_64-pc-linux-gnu)\r
48 Date: Fri, 18 May 2012 13:42:11 -0700\r
49 Message-ID: <87ehqh9q70.fsf@servo.finestructure.net>\r
50 MIME-Version: 1.0\r
51 Content-Type: multipart/signed; boundary="=-=-=";\r
52         micalg=pgp-sha256; protocol="application/pgp-signature"\r
53 X-BeenThere: notmuch@notmuchmail.org\r
54 X-Mailman-Version: 2.1.13\r
55 Precedence: list\r
56 List-Id: "Use and development of the notmuch mail system."\r
57         <notmuch.notmuchmail.org>\r
58 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
59         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
60 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
61 List-Post: <mailto:notmuch@notmuchmail.org>\r
62 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
63 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
64         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
65 X-List-Received-Date: Fri, 18 May 2012 20:42:18 -0000\r
66 \r
67 --=-=-=\r
68 \r
69 On Fri, May 18 2012, Daniel Kahn Gillmor <dkg@fifthhorseman.net> wrote:\r
70 > You could provide a "destructor" function for notmuch_crypto_t, which\r
71 > whoever is responsible for the struct would need to call when they are\r
72 > ready to dispose of it.\r
73 >\r
74 > The destructor would just destroy any GMIME crypto contexts pointed to\r
75 > by the struct, and reset those pointers to NULL.\r
76 \r
77 That sounds reasonable.  I'll see if I can hack something like that.\r
78 \r
79 > Since the common workflow is a singleton notmuch_crypto_t that is a\r
80 > subobject of the singleton notmuch_params_t, you could just call that\r
81 > destructor function before the notmuch_params_t falls out of scope.\r
82 \r
83 Just to be clear, notmuch_crypto_t is not only used as a subobject of\r
84 notmuch_show_params_t.  At least in what I submitted it is used on it's\r
85 own in notmuch-reply.c, in place of notmuch_show_params_t, since the\r
86 reply code was only using the crypto context to decrypt messages being\r
87 replied to.  So it's probably best to handle it independently of\r
88 notmuch_show_params_t.\r
89 \r
90 jamie.\r
91 \r
92 --=-=-=\r
93 Content-Type: application/pgp-signature\r
94 \r
95 -----BEGIN PGP SIGNATURE-----\r
96 Version: GnuPG v1.4.12 (GNU/Linux)\r
97 \r
98 iQIcBAEBCAAGBQJPtrQjAAoJEO00zqvie6q8nOMQAIxUhK6waeFE0Y9UbJNAezt6\r
99 TKWu3UKV7Q9aBQgoJc3GjzR96qwx6i5Rma9n7CoZeNgNRl8qPd9hIzRRToWClJ6D\r
100 N/KaPtJwikbO1CSBgn3kfzaH4rS4F1HACZIqLM7mDiBLlL47dMfh2v41ixWaqlyX\r
101 R2ndkHL/Aer820/guhlnIKy+sKHJa7zFxsrJghlhqrEHyDomWrteCnzhXF+3AgRb\r
102 MXVNc/tXxBXE734ohkWPYT9mIMlwiInoEfSWdgMuoh7FOUXZEpPfvcfJFjq4PyUE\r
103 NfjJA3omFUZHGcJdeSz/eU5ArdPfUJ+0HDxVmH0vkekI8gtsPTiW8ib3ctnjuKud\r
104 bPtaumed71rJC0VGu5LEz+SiYz+6ievB9ZEvuW5liTJl2hUUixqD5RPvFk/kubKI\r
105 SLKa7Xp1qet84moI696jhrBWESz8jJTnM96TuWZMuUHGGeLh/ipQLbar3ZyThuUC\r
106 BtH5C4zqxtsw1jtz5Zrhz98IzLBtmvwuEFt33Vk6EhijoqImlAUPvq4E9CMrWh8i\r
107 pvF0sxd9o6LsdjZdUOzJ5lxlwLqqUdfYnmr047WjcosJJnajOoCjIYRPrk+LVWee\r
108 xuStWV/wiv/prp4d0k0KzKIzWOQVWmsvfNE2zUdTS2SG9zUOVWrWi2vhRKtSFbHs\r
109 Cz9kUhDLyEZpWgZI8Hu4\r
110 =5xLB\r
111 -----END PGP SIGNATURE-----\r
112 --=-=-=--\r