aboutsummaryrefslogtreecommitdiff
path: root/lib/add-message.cc
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2020-07-11 15:30:06 -0300
committerDavid Bremner <david@tethera.net>2020-07-18 11:03:28 -0300
commita4776faa9b85159d9551617f0a61505cf5d16a5a (patch)
tree9db7f37088c7496e43742928e1593f72ffeced5a /lib/add-message.cc
parentef27194a93736910070320be5615a0257342c543 (diff)
lib/add-message: drop use of deprecated notmuch_message_get_flag.
As a side effect, we revert the switch from notmuch_bool_t to bool here. This is because those two types are not actually compatible when passing by reference.
Diffstat (limited to 'lib/add-message.cc')
-rw-r--r--lib/add-message.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/add-message.cc b/lib/add-message.cc
index 8c92689b..9dd4b697 100644
--- a/lib/add-message.cc
+++ b/lib/add-message.cc
@@ -477,7 +477,7 @@ notmuch_database_index_file (notmuch_database_t *notmuch,
notmuch_message_t *message = NULL;
notmuch_status_t ret = NOTMUCH_STATUS_SUCCESS, ret2;
notmuch_private_status_t private_status;
- bool is_ghost = false, is_new = false;
+ notmuch_bool_t is_ghost = false, is_new = false;
notmuch_indexopts_t *def_indexopts = NULL;
const char *date;
@@ -525,7 +525,9 @@ notmuch_database_index_file (notmuch_database_t *notmuch,
is_new = true;
break;
case NOTMUCH_PRIVATE_STATUS_SUCCESS:
- is_ghost = notmuch_message_get_flag (message, NOTMUCH_MESSAGE_FLAG_GHOST);
+ ret = notmuch_message_get_flag_st (message, NOTMUCH_MESSAGE_FLAG_GHOST, &is_ghost);
+ if (ret)
+ goto DONE;
is_new = false;
break;
default: