]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm-dsync: Set NOREPLICATE error code instead of returning it
authorAki Tuomi <aki.tuomi@open-xchange.com>
Tue, 28 May 2019 07:35:55 +0000 (10:35 +0300)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 10 Sep 2019 07:01:35 +0000 (10:01 +0300)
This is how the error handling is supposed to be done.

Broken in 7f0dcac9942910c2934ceab1230e539043167601

src/doveadm/doveadm-dsync.c

index dbb337852af61f76bad6466b65266600e6faf3b8..b0c057e182a253c92e4a7d384968867568fb8123 100644 (file)
@@ -1170,7 +1170,8 @@ cmd_dsync_server_run(struct doveadm_mail_cmd_context *_ctx,
        if (!cli) {
                if (ctx->replicator_notify &&
                    mail_user_plugin_getenv_bool(_ctx->cur_mail_user, "noreplicate")) {
-                       return DOVEADM_EX_NOREPLICATE;
+                       _ctx->exit_code = DOVEADM_EX_NOREPLICATE;
+                       return -1;
                }
 
                /* doveadm-server connection. start with a success reply.