Re: Hi all
[notmuch-archives.git] / 49 / cedd412d7fed71becd54cdc009a290a8073ed7
1 Return-Path: <jani@nikula.org>\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 9999B431FAF\r
6         for <notmuch@notmuchmail.org>; Tue, 10 Sep 2013 11:51:25 -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 2OyoLTYZ1623 for <notmuch@notmuchmail.org>;\r
16         Tue, 10 Sep 2013 11:51:21 -0700 (PDT)\r
17 Received: from mail-we0-f172.google.com (mail-we0-f172.google.com\r
18         [74.125.82.172]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 30515431FAE\r
21         for <notmuch@notmuchmail.org>; Tue, 10 Sep 2013 11:51:21 -0700 (PDT)\r
22 Received: by mail-we0-f172.google.com with SMTP id w61so5913408wes.17\r
23         for <notmuch@notmuchmail.org>; Tue, 10 Sep 2013 11:51:18 -0700 (PDT)\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
25         d=1e100.net; s=20130820;\r
26         h=x-gm-message-state:from:to:cc:subject:date:message-id;\r
27         bh=pn6YIg+L0p+i0NioRlwhK5cuFMW1ME5DOTl6ijqauF4=;\r
28         b=Ybdnq6Suih7Iba2oRlCiJKW07eBHHB/cljqvLrRCufWtgrwtwo6Ymd3qWZnErRKBe5\r
29         l+hxVRSVk8n50UntAV5JPb6jQUJf79YZzZ4+rsziv+vYdXUOKzoCOLXRX+Y4pkSZRf+G\r
30         F32xQJzHt4GAemKmUdrGCLa2+gIEFl3EotF738ar7F9oboT2wfN63EySBcP3sbj5IG4b\r
31         Mnhgq2nFz3TkYnrk8oIEXPlVSmCkrKZrl6+IqYpF1THjCKdpGYk/0ZN1I8tYKW3kalEd\r
32         ZUqkkZ8n8iYIgMoB6KzbgynAPDuozlyg4+sct5Jk8rtBfWWiE3Xl5tZ32QWgrpJGuKLn\r
33         E4NQ==\r
34 X-Gm-Message-State:\r
35  ALoCoQmTfhgw6dVshDIN0Al0OZDW9Fk8p4QorhoqR08fFo+X3hHjGiJoU3xY59rOV2aBKOKzCAcm\r
36 X-Received: by 10.180.20.42 with SMTP id k10mr14710434wie.0.1378839077461;\r
37         Tue, 10 Sep 2013 11:51:17 -0700 (PDT)\r
38 Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.\r
39         [88.195.111.91]) by mx.google.com with ESMTPSA id\r
40         mz14sm5493926wic.11.1969.12.31.16.00.00\r
41         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
42         Tue, 10 Sep 2013 11:51:16 -0700 (PDT)\r
43 From: Jani Nikula <jani@nikula.org>\r
44 To: notmuch@notmuchmail.org\r
45 Subject: [PATCH] lib/cli: pass GMIME_ENABLE_RFC2047_WORKAROUNDS to\r
46         g_mime_init()\r
47 Date: Tue, 10 Sep 2013 21:51:18 +0300\r
48 Message-Id: <1378839078-6298-1-git-send-email-jani@nikula.org>\r
49 X-Mailer: git-send-email 1.8.4.rc3\r
50 X-BeenThere: notmuch@notmuchmail.org\r
51 X-Mailman-Version: 2.1.13\r
52 Precedence: list\r
53 List-Id: "Use and development of the notmuch mail system."\r
54         <notmuch.notmuchmail.org>\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
58 List-Post: <mailto:notmuch@notmuchmail.org>\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
62 X-List-Received-Date: Tue, 10 Sep 2013 18:51:25 -0000\r
63 \r
64 As explained by Jeffrey Stedfast, the author of GMime, quoted in [1]:\r
65 \r
66 > Passing the GMIME_ENABLE_RFC2047_WORKAROUNDS flag to g_mime_init()\r
67 > *should* solve the decoding problem mentioned in the thread. This\r
68 > flag should be safe to pass into g_mime_init() without any bad side\r
69 > effects and my unit tests do test that code-path.\r
70 \r
71 The thread being referred to is [2].\r
72 \r
73 [1] id:87bo56viyo.fsf@nikula.org\r
74 [2] id:08cb1dcd-c5db-4e33-8b09-7730cb3d59a2@gmail.com\r
75 ---\r
76  lib/database.cc    | 2 +-\r
77  lib/index.cc       | 2 +-\r
78  lib/message-file.c | 2 +-\r
79  notmuch.c          | 2 +-\r
80  4 files changed, 4 insertions(+), 4 deletions(-)\r
81 \r
82 diff --git a/lib/database.cc b/lib/database.cc\r
83 index 5cc0765..bb4f180 100644\r
84 --- a/lib/database.cc\r
85 +++ b/lib/database.cc\r
86 @@ -655,7 +655,7 @@ notmuch_database_open (const char *path,\r
87  \r
88      /* Initialize gmime */\r
89      if (! initialized) {\r
90 -       g_mime_init (0);\r
91 +       g_mime_init (GMIME_ENABLE_RFC2047_WORKAROUNDS);\r
92         initialized = 1;\r
93      }\r
94  \r
95 diff --git a/lib/index.cc b/lib/index.cc\r
96 index a2edd6d..78c18cf 100644\r
97 --- a/lib/index.cc\r
98 +++ b/lib/index.cc\r
99 @@ -440,7 +440,7 @@ _notmuch_message_index_file (notmuch_message_t *message,\r
100      static bool mbox_warning = false;\r
101  \r
102      if (! initialized) {\r
103 -       g_mime_init (0);\r
104 +       g_mime_init (GMIME_ENABLE_RFC2047_WORKAROUNDS);\r
105         initialized = 1;\r
106      }\r
107  \r
108 diff --git a/lib/message-file.c b/lib/message-file.c\r
109 index 4d9af89..a2850c2 100644\r
110 --- a/lib/message-file.c\r
111 +++ b/lib/message-file.c\r
112 @@ -228,7 +228,7 @@ notmuch_message_file_get_header (notmuch_message_file_t *message,\r
113      is_received = (strcmp(header_desired,"received") == 0);\r
114  \r
115      if (! initialized) {\r
116 -       g_mime_init (0);\r
117 +       g_mime_init (GMIME_ENABLE_RFC2047_WORKAROUNDS);\r
118         initialized = 1;\r
119      }\r
120  \r
121 diff --git a/notmuch.c b/notmuch.c\r
122 index 78d29a8..7300c21 100644\r
123 --- a/notmuch.c\r
124 +++ b/notmuch.c\r
125 @@ -264,7 +264,7 @@ main (int argc, char *argv[])\r
126  \r
127      local = talloc_new (NULL);\r
128  \r
129 -    g_mime_init (0);\r
130 +    g_mime_init (GMIME_ENABLE_RFC2047_WORKAROUNDS);\r
131  #if !GLIB_CHECK_VERSION(2, 35, 1)\r
132      g_type_init ();\r
133  #endif\r
134 -- \r
135 1.8.4.rc3\r
136 \r