mutt_debug(2, "nm: query successfully initialized (%s)\n", str);
return q;
err:
- if (!nm_db_is_longrun(m))
- nm_db_release(m);
+ nm_db_release(m);
return NULL;
}
done:
if (q)
notmuch_query_destroy(q);
- if (!nm_db_is_longrun(m))
- nm_db_release(m);
+
+ nm_db_release(m);
if (m->msg_count == mdata->oldmsgcount)
mutt_message(_("No more messages in the thread"));
int rc = rename_filename(m, old, new, e);
- if (!nm_db_is_longrun(m))
- nm_db_release(m);
+ nm_db_release(m);
m->mtime.tv_sec = time(NULL);
m->mtime.tv_nsec = 0;
return rc;
notmuch_message_destroy(msg);
if (trans == 1)
nm_db_trans_end(m);
- if (!nm_db_is_longrun(m))
- nm_db_release(m);
+
+ nm_db_release(m);
return rc;
}
if (tags)
notmuch_tags_destroy(tags);
- if (!nm_db_is_longrun(m))
- nm_db_release(m);
+ nm_db_release(m);
mutt_debug(1, "nm: get all tags done [rc=%d tag_count=%u]\n", rc, *tag_count);
return rc;
notmuch_query_destroy(q);
}
- if (!nm_db_is_longrun(m))
- nm_db_release(m);
+ nm_db_release(m);
m->mtime.tv_sec = time(NULL);
m->mtime.tv_nsec = 0;
if (q)
notmuch_query_destroy(q);
- if (!nm_db_is_longrun(m))
- nm_db_release(m);
+ nm_db_release(m);
m->mtime.tv_sec = time(NULL);
m->mtime.tv_nsec = 0;
mutt_str_strfcpy(m->path, uri, sizeof(m->path));
m->magic = MUTT_NOTMUCH;
- if (!nm_db_is_longrun(m))
- nm_db_release(m);
+ nm_db_release(m);
+
if (changed)
{
m->mtime.tv_sec = time(NULL);
rc = 0;
e->changed = true;
done:
- if (!nm_db_is_longrun(m))
- nm_db_release(m);
+ nm_db_release(m);
if (e->changed)
{
m->mtime.tv_sec = time(NULL);
int nm_db_release(struct Mailbox *m)
{
struct NmAccountData *adata = nm_adata_get(m);
- if (!adata || !adata->db)
+ if (!adata || !adata->db || nm_db_is_longrun(m))
return -1;
mutt_debug(1, "nm: db close\n");