From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 9999B431FAF for ; Tue, 10 Sep 2013 11:51:25 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2OyoLTYZ1623 for ; Tue, 10 Sep 2013 11:51:21 -0700 (PDT) Received: from mail-we0-f172.google.com (mail-we0-f172.google.com [74.125.82.172]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 30515431FAE for ; Tue, 10 Sep 2013 11:51:21 -0700 (PDT) Received: by mail-we0-f172.google.com with SMTP id w61so5913408wes.17 for ; Tue, 10 Sep 2013 11:51:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=pn6YIg+L0p+i0NioRlwhK5cuFMW1ME5DOTl6ijqauF4=; b=Ybdnq6Suih7Iba2oRlCiJKW07eBHHB/cljqvLrRCufWtgrwtwo6Ymd3qWZnErRKBe5 l+hxVRSVk8n50UntAV5JPb6jQUJf79YZzZ4+rsziv+vYdXUOKzoCOLXRX+Y4pkSZRf+G F32xQJzHt4GAemKmUdrGCLa2+gIEFl3EotF738ar7F9oboT2wfN63EySBcP3sbj5IG4b Mnhgq2nFz3TkYnrk8oIEXPlVSmCkrKZrl6+IqYpF1THjCKdpGYk/0ZN1I8tYKW3kalEd ZUqkkZ8n8iYIgMoB6KzbgynAPDuozlyg4+sct5Jk8rtBfWWiE3Xl5tZ32QWgrpJGuKLn E4NQ== X-Gm-Message-State: ALoCoQmTfhgw6dVshDIN0Al0OZDW9Fk8p4QorhoqR08fFo+X3hHjGiJoU3xY59rOV2aBKOKzCAcm X-Received: by 10.180.20.42 with SMTP id k10mr14710434wie.0.1378839077461; Tue, 10 Sep 2013 11:51:17 -0700 (PDT) Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi. [88.195.111.91]) by mx.google.com with ESMTPSA id mz14sm5493926wic.11.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 10 Sep 2013 11:51:16 -0700 (PDT) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [PATCH] lib/cli: pass GMIME_ENABLE_RFC2047_WORKAROUNDS to g_mime_init() Date: Tue, 10 Sep 2013 21:51:18 +0300 Message-Id: <1378839078-6298-1-git-send-email-jani@nikula.org> X-Mailer: git-send-email 1.8.4.rc3 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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: Tue, 10 Sep 2013 18:51:25 -0000 As explained by Jeffrey Stedfast, the author of GMime, quoted in [1]: > Passing the GMIME_ENABLE_RFC2047_WORKAROUNDS flag to g_mime_init() > *should* solve the decoding problem mentioned in the thread. This > flag should be safe to pass into g_mime_init() without any bad side > effects and my unit tests do test that code-path. The thread being referred to is [2]. [1] id:87bo56viyo.fsf@nikula.org [2] id:08cb1dcd-c5db-4e33-8b09-7730cb3d59a2@gmail.com --- lib/database.cc | 2 +- lib/index.cc | 2 +- lib/message-file.c | 2 +- notmuch.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/database.cc b/lib/database.cc index 5cc0765..bb4f180 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -655,7 +655,7 @@ notmuch_database_open (const char *path, /* Initialize gmime */ if (! initialized) { - g_mime_init (0); + g_mime_init (GMIME_ENABLE_RFC2047_WORKAROUNDS); initialized = 1; } diff --git a/lib/index.cc b/lib/index.cc index a2edd6d..78c18cf 100644 --- a/lib/index.cc +++ b/lib/index.cc @@ -440,7 +440,7 @@ _notmuch_message_index_file (notmuch_message_t *message, static bool mbox_warning = false; if (! initialized) { - g_mime_init (0); + g_mime_init (GMIME_ENABLE_RFC2047_WORKAROUNDS); initialized = 1; } diff --git a/lib/message-file.c b/lib/message-file.c index 4d9af89..a2850c2 100644 --- a/lib/message-file.c +++ b/lib/message-file.c @@ -228,7 +228,7 @@ notmuch_message_file_get_header (notmuch_message_file_t *message, is_received = (strcmp(header_desired,"received") == 0); if (! initialized) { - g_mime_init (0); + g_mime_init (GMIME_ENABLE_RFC2047_WORKAROUNDS); initialized = 1; } diff --git a/notmuch.c b/notmuch.c index 78d29a8..7300c21 100644 --- a/notmuch.c +++ b/notmuch.c @@ -264,7 +264,7 @@ main (int argc, char *argv[]) local = talloc_new (NULL); - g_mime_init (0); + g_mime_init (GMIME_ENABLE_RFC2047_WORKAROUNDS); #if !GLIB_CHECK_VERSION(2, 35, 1) g_type_init (); #endif -- 1.8.4.rc3