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 D9B36429E31 for ; Fri, 30 Dec 2011 13:58:56 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, 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 YEp+ej+OXi0u for ; Fri, 30 Dec 2011 13:58:56 -0800 (PST) Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com [209.85.216.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 2E18E429E28 for ; Fri, 30 Dec 2011 13:58:56 -0800 (PST) Received: by mail-qy0-f181.google.com with SMTP id a6so10990719qch.26 for ; Fri, 30 Dec 2011 13:58:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=+edMonXMRoakNMYuYaHRbSnKKl55ShA76qfWzRa0kj0=; b=f0KajJ255goD9ebq06ZrpGTwndNmBwupVkhx4HmPGCdF0LUY1Vl/qfVGKfiw+yMpO/ u0q/kCfZgieqd8+f297XmzLObDn2xMomgsu2B1VSfFilClm5gd/SKjTZuNtl7UBucre+ Ch+0gIHfbbzeznKzwZ7knHI11zGQS8heeEszU= Received: by 10.229.77.134 with SMTP id g6mr15008398qck.125.1325282335956; Fri, 30 Dec 2011 13:58:55 -0800 (PST) Received: from localhost.localdomain (201-1-35-143.dsl.telesp.net.br. [201.1.35.143]) by mx.google.com with ESMTPS id z1sm74916346qao.1.2011.12.30.13.58.54 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 30 Dec 2011 13:58:55 -0800 (PST) From: Kazuo Teramoto To: notmuch@notmuchmail.org, David Bremner Subject: [PATCH 2/2] lib: call g_mime_init from notmuch_database_open Date: Fri, 30 Dec 2011 19:58:10 -0200 Message-Id: <1325282290-29565-3-git-send-email-kaz.rag@gmail.com> X-Mailer: git-send-email 1.7.8.1 In-Reply-To: <1325282290-29565-1-git-send-email-kaz.rag@gmail.com> References: <877h1e6r9d.fsf@zancas.localnet> <1325282290-29565-1-git-send-email-kaz.rag@gmail.com> 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: Fri, 30 Dec 2011 21:58:57 -0000 We need to call g_mime_init to correct initialize the structures needed by gmime before using it. --- lib/database.cc | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/lib/database.cc b/lib/database.cc index d11dfaf..07ca3fd 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -28,6 +28,8 @@ #include /* g_free, GPtrArray, GHashTable */ #include /* g_type_init */ +#include /* g_mime_init */ + using namespace std; #define ARRAY_SIZE(arr) (sizeof (arr) / sizeof (arr[0])) @@ -608,6 +610,9 @@ notmuch_database_open (const char *path, /* Initialize the GLib type system and threads */ g_type_init (); + /* Initialize gmime */ + g_mime_init (0); + notmuch = talloc (NULL, notmuch_database_t); notmuch->exception_reported = FALSE; notmuch->path = talloc_strdup (notmuch, path); -- 1.7.8.1