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 7F8DF431FBD for ; Wed, 31 Oct 2012 09:43:33 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0.01 X-Spam-Level: X-Spam-Status: No, score=0.01 tagged_above=-999 required=5 tests=[T_MIME_NO_TEXT=0.01] 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 J5fa0-B9LvKK for ; Wed, 31 Oct 2012 09:43:32 -0700 (PDT) Received: from mail.sflc.info (mail.sflc.info [207.86.247.70]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id CA89E431FBC for ; Wed, 31 Oct 2012 09:43:32 -0700 (PDT) Received: from localhost (ool-457af02d.dyn.optonline.net [69.122.240.45]) by mail.sflc.info (Postfix) with ESMTPSA id 8D377B4C019 for ; Wed, 31 Oct 2012 16:43:30 +0000 (UTC) From: James Vasile To: notmuch mailing list Subject: [PATCH] fix notmuch_database_open call in addrlookup User-Agent: Notmuch/0.14+96~gb732e1b (http://notmuchmail.org) Emacs/23.4.1 (i486-pc-linux-gnu) Date: Wed, 31 Oct 2012 12:43:24 -0400 Message-ID: <87ip9q4moj.fsf@hackervisions.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" 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: Wed, 31 Oct 2012 16:43:33 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable What's the best way to submit changes to addrlookup? Right now, it is out of date vs the latest libnotmuch. The addrlookup repo is vala code but the wiki [1] points to a generated c file [2]. [1] http://github.com/spaetz/vala-notmuch/raw/static-sources/src/addrlookup= .c [2] http://notmuchmail.org/emacstips/ At any rate, a patch to that c file is below. If you upgraded notmuch and now addrlookup gives errors about not finding libnotmuch.so.2, this patch might be what you need. In the latest version of notmuch in git, notmuch_database_open returns a status and takes what used to be the return value as a reference parameter. This patch adjusts code to pass the db pointer in a parameter and accept the status as return value. We don't do anything with the status at present. =2D-- addrlookup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addrlookup.c b/addrlookup.c index 5f724ef..aed77e7 100644 =2D-- a/addrlookup.c +++ b/addrlookup.c @@ -804,12 +804,14 @@ void address_matcher_run (AddressMatcher* self, const= gchar* name) { gchar** _result_; gint _result__length1; gint __result__size_; + notmuch_status_t status; + g_return_if_fail (self !=3D NULL); _tmp0_ =3D g_new0 (notmuch_query_t*, 0); queries =3D _tmp0_; queries_length1 =3D 0; _queries_size_ =3D 0; =2D _tmp1_ =3D notmuch_database_open (self->priv->user_db_path, NOTMU= CH_DATABASE_MODE_READ_ONLY); + status =3D notmuch_database_open (self->priv->user_db_path, NOTMUCH= _DATABASE_MODE_READ_ONLY, &_tmp1_); _notmuch_database_close0 (self->priv->db); self->priv->db =3D _tmp1_; _tmp2_ =3D g_strconcat ("tag:", self->priv->user_addrbook_tag, NULL= ); =2D-=20 1.7.10.4 --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQEcBAEBAgAGBQJQkVUsAAoJECaDklOuuidYZEIIALQf0e+hpCChYhsMbJzx7z8j nNllHMMv+wEdBZ/9CmEUI1zq1nlKhqef0VIU81xVvbNxZoLmj9qGn23/rNkre0t8 BKq7HgvKVjGsenEoDXyRIaqJJItCuij8ZgHCjJMK65WTC3/vqZ/FXkcYBcTH3u3U DbcL3QrMsdjG/m7ElU3BO0mIURVFvYUPrGGKlKXO6eFqkQssCjBUTQe6R9+w/qQl J4kO93v8OO3f/CLESK4lyrWMUp8IeT3dULDXGLpLPODJHq/afxpXxz7A+kp9vbOK +5EZ3pfvyQSAsoVkojausGuHx0TT3jtL3ayBpBs8wN+LdD+2ztVXVYT2UN7nFZ0= =ncCo -----END PGP SIGNATURE----- --=-=-=--