return 1;
}
-int mail_index_sync_record(struct mail_index_sync_map_ctx *ctx,
- const struct mail_transaction_header *hdr,
- const void *data)
+static int
+mail_index_sync_record_real(struct mail_index_sync_map_ctx *ctx,
+ const struct mail_transaction_header *hdr,
+ const void *data)
{
int ret = 0;
return ret;
}
+int mail_index_sync_record(struct mail_index_sync_map_ctx *ctx,
+ const struct mail_transaction_header *hdr,
+ const void *data)
+{
+ int ret;
+
+ T_BEGIN {
+ ret = mail_index_sync_record_real(ctx, hdr, data);
+ } T_END;
+ return ret;
+}
+
void mail_index_sync_map_init(struct mail_index_sync_map_ctx *sync_map_ctx,
struct mail_index_view *view,
enum mail_index_sync_handler_type type)
}
/* we'll just skip over broken entries */
- T_BEGIN {
- (void)mail_index_sync_record(&sync_map_ctx,
- thdr, tdata);
- } T_END;
+ (void)mail_index_sync_record(&sync_map_ctx, thdr, tdata);
}
map = view->map;
if (ctx->sync_map_update && !synced_to_map) {
if ((hdr->type & (MAIL_TRANSACTION_EXPUNGE |
MAIL_TRANSACTION_EXPUNGE_GUID)) == 0) {
- T_BEGIN {
- ret = mail_index_sync_record(&ctx->sync_map_ctx,
- hdr, ctx->data);
- } T_END;
+ ret = mail_index_sync_record(&ctx->sync_map_ctx,
+ hdr, ctx->data);
}
if (ret < 0)
return -1;