success = TRUE;
}
- mailbox_transaction_commit(&mctx);
+ if (mailbox_transaction_commit(&mctx) < 0) {
+ i_error(OX_LOG_LABEL "Transaction commit failed: %s",
+ mailbox_get_last_error(inbox, NULL));
+ /* the commit doesn't matter though. */
+ }
}
mailbox_free(&inbox);
struct push_notification_event_mailboxcreate_data *data;
struct mailbox_status status;
- mailbox_get_status(ptxn->mbox, STATUS_UIDVALIDITY, &status);
+ if (mailbox_get_status(ptxn->mbox, STATUS_UIDVALIDITY, &status) < 0) {
+ i_error(EVENT_NAME "Failed to get created mailbox '%s' uidvalidity: %s",
+ mailbox_get_vname(ptxn->mbox),
+ mailbox_get_last_error(ptxn->mbox, NULL));
+ status.uidvalidity = 0;
+ }
data = p_new(ptxn->pool,
struct push_notification_event_mailboxcreate_data, 1);