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