X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fdatabase.cc;h=0052cb659e896841e8c54e1850864fcd0ef1e8ad;hb=ea30110;hp=d2ccdd580b764189f700c8f5dd9b063e37a8560b;hpb=a6a580e61613507edc47e0eac0b2b84f6678d01c;p=notmuch diff --git a/lib/database.cc b/lib/database.cc index d2ccdd58..0052cb65 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -305,6 +305,8 @@ notmuch_status_to_string (notmuch_status_t status) return "Unknown crypto protocol"; case NOTMUCH_STATUS_NO_CONFIG: return "No configuration file found"; + case NOTMUCH_STATUS_NO_DATABASE: + return "No database found"; case NOTMUCH_STATUS_DATABASE_EXISTS: return "Database exists, not recreated"; default: @@ -731,6 +733,15 @@ notmuch_status_t notmuch_database_destroy (notmuch_database_t *notmuch) { notmuch_status_t status; + const char* talloc_report; + + talloc_report = getenv ("NOTMUCH_TALLOC_REPORT"); + if (talloc_report && strcmp (talloc_report, "") != 0) { + FILE *report = fopen (talloc_report, "a"); + if (report) { + talloc_report_full (notmuch, report); + } + } status = notmuch_database_close (notmuch);