From: Aki Tuomi Date: Fri, 21 Oct 2016 10:55:42 +0000 (+0300) Subject: doveadm: Rewind input early enough X-Git-Tag: 2.2.27~312 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=60cc5afcaef1fb9c6971d13254ba3de8d390e092;p=thirdparty%2Fdovecot%2Fcore.git doveadm: Rewind input early enough Command input needs to be rewinded earlier in doveadm_mail_next_user. --- diff --git a/src/doveadm/doveadm-mail.c b/src/doveadm/doveadm-mail.c index b8c1483941..2d7c4a247f 100644 --- a/src/doveadm/doveadm-mail.c +++ b/src/doveadm/doveadm-mail.c @@ -366,6 +366,8 @@ doveadm_mail_next_user(struct doveadm_mail_cmd_context *ctx, else i_set_failure_prefix("doveadm(%s,%s): ", ip, cctx->username); doveadm_cctx_to_storage_service_input(cctx, &input); + if (ctx->cmd_input != NULL) + i_stream_seek(ctx->cmd_input, 0); /* see if we want to execute this command via (another) doveadm server */ @@ -399,8 +401,6 @@ doveadm_mail_next_user(struct doveadm_mail_cmd_context *ctx, return ret; } - if (ctx->cmd_input != NULL) - i_stream_seek(ctx->cmd_input, 0); if (ctx->v.run(ctx, ctx->cur_mail_user) < 0) { i_assert(ctx->exit_code != 0); }