This is in order to use mail_set_critical() in the function later.
ctx->data.attach = attach;
}
-static int save_check_write_error(struct mail_storage *storage,
+static int save_check_write_error(struct mail_save_context *ctx,
struct ostream *output)
{
+ struct mail_storage *storage = ctx->transaction->box->storage;
+
if (output->stream_errno == 0)
return 0;
return -1;
}
if (ctx->data.output != NULL) {
- if (save_check_write_error(storage, ctx->data.output) < 0)
+ if (save_check_write_error(ctx, ctx->data.output) < 0)
return -1;
}
return 0;