]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm-mail: Set exit code to EX_TEMPFAIL on timeout
authorAki Tuomi <aki.tuomi@dovecot.fi>
Mon, 12 Dec 2016 07:41:02 +0000 (09:41 +0200)
committerGitLab <gitlab@git.dovecot.net>
Wed, 14 Dec 2016 15:29:27 +0000 (17:29 +0200)
When running `doveadm save` command on proxy/director
and the remote command execution times out, exit code
must be set to EX_TEMPFAIL.

Fixes Panic: file doveadm-mail.c: line 405 (doveadm_mail_next_user):
assertion failed: (ctx->exit_code != 0)

src/doveadm/doveadm-mail.c

index efbc4d13087ce3cae5052daa1b72936a70fdba63..dbf3a330f4a4386e116efaa5478f5ef0a5656a8f 100644 (file)
@@ -188,6 +188,7 @@ static void doveadm_mail_cmd_input_timeout(struct doveadm_mail_cmd_context *ctx)
        i_stream_set_name(input, i_stream_get_name(ctx->cmd_input));
        i_stream_destroy(&ctx->cmd_input);
        ctx->cmd_input = input;
+       ctx->exit_code = EX_TEMPFAIL;
        io_loop_stop(current_ioloop);
 }