switch (status) {
case NOTMUCH_STATUS_SUCCESS:
return "No error occurred";
+ case NOTMUCH_STATUS_OUT_OF_MEMORY:
+ return "Out of memory";
case NOTMUCH_STATUS_XAPIAN_EXCEPTION:
return "A Xapian exception occurred";
case NOTMUCH_STATUS_FILE_ERROR:
return notmuch->path;
}
-notmuch_private_status_t
+static notmuch_private_status_t
find_timestamp_document (notmuch_database_t *notmuch, const char *db_key,
Xapian::Document *doc, unsigned int *doc_id)
{
*
* Otherwise, returns a newly talloced string belonging to 'ctx'.
*/
-const char *
+static const char *
_resolve_message_id_to_thread_id (notmuch_database_t *notmuch,
void *ctx,
const char *message_id)
notmuch_message_t *message,
notmuch_message_file_t *message_file)
{
- notmuch_status_t ret = NOTMUCH_STATUS_SUCCESS;
+ notmuch_status_t status;
const char *thread_id = NULL;
- _notmuch_database_link_message_to_parents (notmuch, message,
- message_file,
- &thread_id);
+ status = _notmuch_database_link_message_to_parents (notmuch, message,
+ message_file,
+ &thread_id);
+ if (status)
+ return status;
- ret = _notmuch_database_link_message_to_children (notmuch, message,
- &thread_id);
+ status = _notmuch_database_link_message_to_children (notmuch, message,
+ &thread_id);
+ if (status)
+ return status;
if (thread_id == NULL)
_notmuch_message_ensure_thread_id (message);
- return ret;
+ return NOTMUCH_STATUS_SUCCESS;
}
notmuch_status_t