<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/lib/database.cc, branch debian/0.12_rc2-1</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=debian%2F0.12_rc2-1</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=debian%2F0.12_rc2-1'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2012-03-18T10:58:35Z</updated>
<entry>
<title>Fix error reporting in notmuch_database_find_message_by_filename</title>
<updated>2012-03-18T10:58:35Z</updated>
<author>
<name>Justus Winter</name>
<email>4winter@informatik.uni-hamburg.de</email>
</author>
<published>2012-03-17T16:41:27Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=ea54c4fdc7d0ed9a4d6ab328d44c10ce5668d587'/>
<id>urn:sha1:ea54c4fdc7d0ed9a4d6ab328d44c10ce5668d587</id>
<content type='text'>
Formerly it was possible for *message_ret to be left
uninitialized. The documentation however clearly states that "[o]n any
failure or when the message is not found, this function initializes
'*message' to NULL".

Signed-off-by: Justus Winter &lt;4winter@informatik.uni-hamburg.de&gt;
</content>
</entry>
<entry>
<title>Actually close the xapian database in notmuch_database_close</title>
<updated>2012-03-03T15:30:07Z</updated>
<author>
<name>Justus Winter</name>
<email>4winter@informatik.uni-hamburg.de</email>
</author>
<published>2012-03-02T14:58:39Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=cfc5f1059aa16753cba610c41601cacc97260e08'/>
<id>urn:sha1:cfc5f1059aa16753cba610c41601cacc97260e08</id>
<content type='text'>
Formerly the xapian database object was deleted and closed in its
destructor once the object was garbage collected. Explicitly call
close() so that the database and the associated lock is released
immediately.

The comment is a courtesy of Austin Clements.

Signed-off-by: Justus Winter &lt;4winter@informatik.uni-hamburg.de&gt;
</content>
</entry>
<entry>
<title>Prevent segmentation fault in notmuch_database_close</title>
<updated>2012-02-21T03:03:25Z</updated>
<author>
<name>Justus Winter</name>
<email>4winter@informatik.uni-hamburg.de</email>
</author>
<published>2012-02-18T23:56:57Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=e2e95caa51f8c1ea57b4fc7d3926fda1fb1aed10'/>
<id>urn:sha1:e2e95caa51f8c1ea57b4fc7d3926fda1fb1aed10</id>
<content type='text'>
Previously opening a notmuch database in read write mode that has been
locked resulted in the notmuch_database_open function executing
notmuch_database_close as a cleanup function. notmuch_database_close
failed to check whether the xapian database has in fact been created.

Add a check whether the xapian database object has actually been
created before trying to call its flush method.

Signed-off-by: Justus Winter &lt;4winter@informatik.uni-hamburg.de&gt;
</content>
</entry>
<entry>
<title>lib: Use talloc to simplify cleanup in notmuch_database_open</title>
<updated>2012-02-04T01:15:45Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-01-29T05:50:10Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=c32116d04807eec475d7e19bb6723c35bc399059'/>
<id>urn:sha1:c32116d04807eec475d7e19bb6723c35bc399059</id>
<content type='text'>
Previously, we manually "free"d various pointers in
notmuch_database_open.  Use a local talloc context instead to simplify
cleanup and eliminate various NULL pointer initializations and
conditionals.
</content>
</entry>
<entry>
<title>lib: Release resources if notmuch_database_open fails</title>
<updated>2012-02-04T01:15:26Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-01-29T05:50:09Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=6c0adab23eadb81bb1254f4b82175902df11bb3f'/>
<id>urn:sha1:6c0adab23eadb81bb1254f4b82175902df11bb3f</id>
<content type='text'>
Previously, if a Xapian exception occurred in notmuch_database_open,
we failed to clean up the allocated notmuch_database_t object.
</content>
</entry>
<entry>
<title>lib: Don't delete uninitialized pointers</title>
<updated>2012-02-04T01:14:59Z</updated>
<author>
<name>Austin Clements</name>
<email>amdragon@MIT.EDU</email>
</author>
<published>2012-01-29T05:50:08Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=a8ee1c75c348f41d88398fc394812e66e8e8b72e'/>
<id>urn:sha1:a8ee1c75c348f41d88398fc394812e66e8e8b72e</id>
<content type='text'>
In the error-handling paths of notmuch_database_open, we call
notmuch_database_close, which "delete"s several objects referenced by
the notmuch_database_t object.  However, some of these pointers may be
uninitialized, resulting in undefined behavior.  Hence, allocate the
notmuch_database_t with talloc_zero to make sure these pointers are
NULL so that "delete"ing them is harmless.
</content>
</entry>
<entry>
<title>lib: call g_mime_init() from notmuch_database_open()</title>
<updated>2012-01-01T03:08:15Z</updated>
<author>
<name>Kazuo Teramoto</name>
<email>kaz.rag@gmail.com</email>
</author>
<published>2011-12-31T04:37:41Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=442d405ad301bd0bc9dc1d385c21f943ba743308'/>
<id>urn:sha1:442d405ad301bd0bc9dc1d385c21f943ba743308</id>
<content type='text'>
As reported in
id:"CAEbOPGyuHnz4BPtDutnTPUHcP3eYcRCRkXhYoJR43RUMw671+g@mail.gmail.com"
sometimes gmime tries to access a NULL pointer, e.g. g_mime_iconv_open()
tries to access iconv_cache that is NULL if g_mime_init() is not called.
This causes notmuch to segfault when calling gmime functions.

Calling g_mime_init() initializes iconv_cache and others variables needed
by gmime, making sure they are initialized when notmuch calls gmime
functions.

Test marked fix by db.
</content>
</entry>
<entry>
<title>Fix comments about what is stored in the database</title>
<updated>2011-12-23T19:08:34Z</updated>
<author>
<name>Thomas Jost</name>
<email>schnouki@schnouki.net</email>
</author>
<published>2011-12-13T17:11:41Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=824dad76b6ae4a7e4a3ca41991af8e7d67f4cfd5'/>
<id>urn:sha1:824dad76b6ae4a7e4a3ca41991af8e7d67f4cfd5</id>
<content type='text'>
Commit 567bcbc2 introduced two new values for each message (content of the
"From" and "Subject" headers), but the comments about the database schema had
not been updated accordingly.
</content>
</entry>
<entry>
<title>notmuch: Quiet buildbot warnings.</title>
<updated>2011-12-21T11:32:16Z</updated>
<author>
<name>David Edmondson</name>
<email>dme@dme.org</email>
</author>
<published>2011-12-20T15:20:04Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=77ec8108a10a8d372bed6298e22c89d7de651577'/>
<id>urn:sha1:77ec8108a10a8d372bed6298e22c89d7de651577</id>
<content type='text'>
Cast away the result of various *write functions. Provide a default
value for some variables to avoid "use before set" warnings.
</content>
</entry>
<entry>
<title>lib: call g_type_init from notmuch_database_open</title>
<updated>2011-12-05T02:00:25Z</updated>
<author>
<name>David Bremner</name>
<email>bremner@debian.org</email>
</author>
<published>2011-12-04T19:20:39Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=69dc421ab3355930f23ec6aa47e7e936cbfafb97'/>
<id>urn:sha1:69dc421ab3355930f23ec6aa47e7e936cbfafb97</id>
<content type='text'>
We want to make sure g_type_init is called before any GObject
functionality is used.
</content>
</entry>
</feed>
