[PATCH 4/4] Update NEWS for user.other_name
[notmuch-archives.git] / ee / c16599724cd58f6c6a82e5e8701aaafa429d30
1 Return-Path: <amdragon@mit.edu>\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 77C3F431FAF\r
6         for <notmuch@notmuchmail.org>; Thu, 17 May 2012 15:26:52 -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: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 BZE9yOo0wKQv for <notmuch@notmuchmail.org>;\r
16         Thu, 17 May 2012 15:26:51 -0700 (PDT)\r
17 Received: from dmz-mailsec-scanner-8.mit.edu (DMZ-MAILSEC-SCANNER-8.MIT.EDU\r
18         [18.7.68.37])\r
19         by olra.theworths.org (Postfix) with ESMTP id A261C431FAE\r
20         for <notmuch@notmuchmail.org>; Thu, 17 May 2012 15:26:51 -0700 (PDT)\r
21 X-AuditID: 12074425-b7f966d0000008b6-89-4fb57b2ade8f\r
22 Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])\r
23         by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id 54.B9.02230.A2B75BF4; Thu, 17 May 2012 18:26:50 -0400 (EDT)\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
26         by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id q4HMQn9e030332; \r
27         Thu, 17 May 2012 18:26:50 -0400\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
29         (authenticated bits=0)\r
30         (User authenticated as amdragon@ATHENA.MIT.EDU)\r
31         by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q4HMQmFc010903\r
32         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
33         Thu, 17 May 2012 18:26:49 -0400 (EDT)\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
35         (envelope-from <amdragon@mit.edu>)\r
36         id 1SV99j-0003Uc-Q4; Thu, 17 May 2012 18:26:47 -0400\r
37 Date: Thu, 17 May 2012 18:26:47 -0400\r
38 From: Austin Clements <amdragon@MIT.EDU>\r
39 To: Jameson Graef Rollins <jrollins@finestructure.net>\r
40 Subject: Re: [PATCH 3/6] cli: modify mime_node_open to take crypto struct as\r
41         argument\r
42 Message-ID: <20120517222647.GP11804@mit.edu>\r
43 References: <1337205359-2444-1-git-send-email-jrollins@finestructure.net>\r
44         <1337205359-2444-2-git-send-email-jrollins@finestructure.net>\r
45         <1337205359-2444-3-git-send-email-jrollins@finestructure.net>\r
46         <1337205359-2444-4-git-send-email-jrollins@finestructure.net>\r
47 MIME-Version: 1.0\r
48 Content-Type: text/plain; charset=us-ascii\r
49 Content-Disposition: inline\r
50 In-Reply-To: <1337205359-2444-4-git-send-email-jrollins@finestructure.net>\r
51 User-Agent: Mutt/1.5.21 (2010-09-15)\r
52 X-Brightmail-Tracker:\r
53  H4sIAAAAAAAAA+NgFuplleLIzCtJLcpLzFFi42IR4hTV1tWq3upvcPyztMWefV4W12/OZHZg\r
54         8rh7msvj2apbzAFMUVw2Kak5mWWpRfp2CVwZ2xsvMRU8Vqro2X2BrYHxqHQXIyeHhICJxNOn\r
55         HSwQtpjEhXvr2UBsIYF9jBLNLy26GLmA7A2MEve3v2WDcE4ySXTcPw7lLGGUuDn9AhNIC4uA\r
56         qsTZ0w2sIDabgIbEtv3LGUFsEQEziZ4vf8BsZgEtia0bP4DZwgLhEutungar5xXQkehZO40V\r
57         Ymgnk8SlG7uZIBKCEidnPmGBab7x7yVQnAPIlpZY/o8DxOQU8JKYvZIZpEJUQEViysltbBMY\r
58         hWYhaZ6FpHkWQvMCRuZVjLIpuVW6uYmZOcWpybrFyYl5ealFuhZ6uZkleqkppZsYQSHN7qK6\r
59         g3HCIaVDjAIcjEo8vAGnNvsLsSaWFVfmHmKU5GBSEuV9UrnVX4gvKT+lMiOxOCO+qDQntfgQ\r
60         owQHs5II7351oBxvSmJlVWpRPkxKmoNFSZxXU+udn5BAemJJanZqakFqEUxWhoNDSYL3G8hQ\r
61         waLU9NSKtMycEoQ0EwcnyHAeoOHfQWp4iwsSc4sz0yHypxh1Of48XHSNUYglLz8vVUqc9wFI\r
62         kQBIUUZpHtwcWCp6xSgO9JYwL08VUBUPMI3BTXoFtIQJaElZ7iaQJSWJCCmpBkYzBS5eRkYX\r
63         pr3hnO+EdQ4fPj+PtyF9ztbls5y/7svpjNDduuXGvK37Pmqe/2WwmF9/1SrBKds3KHVZ5Grc\r
64         9Qh9LOS03K7IYy37XbcWO2W5wMklYt5bLgZ92n+1hvNvc2/H2Xh3jcgK1hl5EkFxl0/f7HH9\r
65         7Py6y6Bs91G9BvE9G4/HTng+5ZoSS3FGoqEWc1FxIgAch6QCIAMAAA==\r
66 Cc: Notmuch Mail <notmuch@notmuchmail.org>\r
67 X-BeenThere: notmuch@notmuchmail.org\r
68 X-Mailman-Version: 2.1.13\r
69 Precedence: list\r
70 List-Id: "Use and development of the notmuch mail system."\r
71         <notmuch.notmuchmail.org>\r
72 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
73         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
74 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
75 List-Post: <mailto:notmuch@notmuchmail.org>\r
76 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
77 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
78         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
79 X-List-Received-Date: Thu, 17 May 2012 22:26:52 -0000\r
80 \r
81 Quoth Jameson Graef Rollins on May 16 at  2:55 pm:\r
82 > Again, for interface simplification and getting rid of more #ifdefs.\r
83 > ---\r
84 >  mime-node.c      |   10 ++--------\r
85 >  notmuch-client.h |   14 +++++---------\r
86 >  notmuch-reply.c  |    6 ++----\r
87 >  notmuch-show.c   |    3 +--\r
88 >  4 files changed, 10 insertions(+), 23 deletions(-)\r
89\r
90 > diff --git a/mime-node.c b/mime-node.c\r
91 > index 79a3654..4faeffc 100644\r
92 > --- a/mime-node.c\r
93 > +++ b/mime-node.c\r
94 > @@ -56,12 +56,7 @@ _mime_node_context_free (mime_node_context_t *res)\r
95 >  \r
96 >  notmuch_status_t\r
97 >  mime_node_open (const void *ctx, notmuch_message_t *message,\r
98 > -#ifdef GMIME_ATLEAST_26\r
99 > -             GMimeCryptoContext *cryptoctx,\r
100 > -#else\r
101 > -             GMimeCipherContext *cryptoctx,\r
102 > -#endif\r
103 > -             notmuch_bool_t decrypt, mime_node_t **root_out)\r
104 > +             notmuch_crypto_t *crypto, mime_node_t **root_out)\r
105 >  {\r
106 >      const char *filename = notmuch_message_get_filename (message);\r
107 >      mime_node_context_t *mctx;\r
108 > @@ -113,8 +108,7 @@ mime_node_open (const void *ctx, notmuch_message_t *message,\r
109 >       goto DONE;\r
110 >      }\r
111 >  \r
112 > -    mctx->crypto.gpgctx = cryptoctx;\r
113 > -    mctx->crypto.decrypt = decrypt;\r
114 > +    mctx->crypto = *crypto;\r
115 \r
116 I think you want to store the notmuch_crypto_t* pointer in the\r
117 mime_node_t, rather than copying the value.  This doesn't matter so\r
118 much at this point, but when you later start lazily constructing the\r
119 cyrpto context, storing it by value will force you to lazily\r
120 initialize it separately potentially for every mime_node_t instance.\r
121 \r
122 >  \r
123 >      /* Create the root node */\r
124 >      root->part = GMIME_OBJECT (mctx->mime_message);\r
125 > diff --git a/notmuch-client.h b/notmuch-client.h\r
126 > index 2ad24cf..d86fab3 100644\r
127 > --- a/notmuch-client.h\r
128 > +++ b/notmuch-client.h\r
129 > @@ -345,9 +345,10 @@ struct mime_node {\r
130 >  };\r
131 >  \r
132 >  /* Construct a new MIME node pointing to the root message part of\r
133 > - * message.  If cryptoctx is non-NULL, it will be used to verify\r
134 > - * signatures on any child parts.  If decrypt is true, then cryptoctx\r
135 > - * will additionally be used to decrypt any encrypted child parts.\r
136 > + * message.  If crypto.gpgctx is non-NULL, it will be used to verify\r
137 > + * signatures on any child parts.  If crypto.decrypt is true, then\r
138 > + * crypto.gpgctx will additionally be used to decrypt any encrypted\r
139 > + * child parts.\r
140 >   *\r
141 >   * Return value:\r
142 >   *\r
143 > @@ -359,12 +360,7 @@ struct mime_node {\r
144 >   */\r
145 >  notmuch_status_t\r
146 >  mime_node_open (const void *ctx, notmuch_message_t *message,\r
147 > -#ifdef GMIME_ATLEAST_26\r
148 > -             GMimeCryptoContext *cryptoctx,\r
149 > -#else\r
150 > -             GMimeCipherContext *cryptoctx,\r
151 > -#endif\r
152 > -             notmuch_bool_t decrypt, mime_node_t **node_out);\r
153 > +             notmuch_crypto_t *crypto, mime_node_t **node_out);\r
154 >  \r
155 >  /* Return a new MIME node for the requested child part of parent.\r
156 >   * parent will be used as the talloc context for the returned child\r
157 > diff --git a/notmuch-reply.c b/notmuch-reply.c\r
158 > index ed87899..6662adb 100644\r
159 > --- a/notmuch-reply.c\r
160 > +++ b/notmuch-reply.c\r
161 > @@ -544,8 +544,7 @@ notmuch_reply_format_default(void *ctx,\r
162 >       g_object_unref (G_OBJECT (reply));\r
163 >       reply = NULL;\r
164 >  \r
165 > -     if (mime_node_open (ctx, message, crypto->gpgctx, crypto->decrypt,\r
166 > -                         &root) == NOTMUCH_STATUS_SUCCESS) {\r
167 > +     if (mime_node_open (ctx, message, crypto, &root) == NOTMUCH_STATUS_SUCCESS) {\r
168 >           format_part_reply (root);\r
169 >           talloc_free (root);\r
170 >       }\r
171 > @@ -574,8 +573,7 @@ notmuch_reply_format_json(void *ctx,\r
172 >  \r
173 >      messages = notmuch_query_search_messages (query);\r
174 >      message = notmuch_messages_get (messages);\r
175 > -    if (mime_node_open (ctx, message, crypto->gpgctx, crypto->decrypt,\r
176 > -                     &node) != NOTMUCH_STATUS_SUCCESS)\r
177 > +    if (mime_node_open (ctx, message, crypto, &node) != NOTMUCH_STATUS_SUCCESS)\r
178 >       return 1;\r
179 >  \r
180 >      reply = create_reply_message (ctx, config, message, reply_all);\r
181 > diff --git a/notmuch-show.c b/notmuch-show.c\r
182 > index d254179..8b4d308 100644\r
183 > --- a/notmuch-show.c\r
184 > +++ b/notmuch-show.c\r
185 > @@ -810,8 +810,7 @@ show_message (void *ctx,\r
186 >      mime_node_t *root, *part;\r
187 >      notmuch_status_t status;\r
188 >  \r
189 > -    status = mime_node_open (local, message, params->crypto.gpgctx,\r
190 > -                          params->crypto.decrypt, &root);\r
191 > +    status = mime_node_open (local, message, &(params->crypto), &root);\r
192 >      if (status)\r
193 >       goto DONE;\r
194 >      part = mime_node_seek_dfs (root, (params->part < 0 ? 0 : params->part));\r