int ret;
hdr_ctx = message_parse_header_init(input, hdr_size, flags);
- while ((ret = message_parse_header_next(hdr_ctx, &hdr)) > 0)
+ while ((ret = message_parse_header_next(hdr_ctx, &hdr)) > 0) T_BEGIN {
callback(hdr, context);
+ } T_END;
i_assert(ret != 0);
message_parse_header_deinit(&hdr_ctx);
/* call after the final skipping */
- callback(NULL, context);
+ T_BEGIN {
+ callback(NULL, context);
+ } T_END;
}
void message_header_line_write(buffer_t *output,
int ret;
while ((ret = message_parser_parse_next_block(ctx, &block)) > 0) {
- callback(block.part, block.hdr, context);
+ T_BEGIN {
+ callback(block.part, block.hdr, context);
+ } T_END;
if (block.hdr == NULL)
break;
i_assert(ret != 0);
i_assert(ctx->part != NULL);
- if (ret < 0) {
+ if (ret < 0) T_BEGIN {
/* well, can't return error so fake end of headers */
callback(ctx->part, NULL, context);
- }
+ } T_END;
*hdr_size = ctx->part->header_size;
}
int ret;
while ((ret = message_parser_parse_next_block(ctx, &block)) > 0) {
- if (block.size == 0 && hdr_callback != NULL)
+ if (block.size == 0 && hdr_callback != NULL) T_BEGIN {
hdr_callback(block.part, block.hdr, context);
+ } T_END;
}
i_assert(ret != 0);
}