Mercurial > dovecot > core-2.2
changeset 20691:45db0080ece6
doveadm-server: Reset error code between calls
author | Aki Tuomi <aki.tuomi@dovecot.fi> |
---|---|
date | Sun, 28 Aug 2016 18:40:01 +0300 |
parents | 50456ea55fec |
children | 914bc37e32bf |
files | src/doveadm/client-connection.c |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/doveadm/client-connection.c Sun Aug 28 19:55:29 2016 +0300 +++ b/src/doveadm/client-connection.c Sun Aug 28 18:40:01 2016 +0300 @@ -72,7 +72,6 @@ struct doveadm_cmd_context *cctx) { i_getopt_reset(); - doveadm_exit_code = 0; if (doveadm_cmd_run_ver2(argc, argv, cctx) < 0) doveadm_exit_code = EX_USAGE; doveadm_cmd_server_post(conn, cctx->cmd->name); @@ -84,7 +83,6 @@ const struct doveadm_cmd *cmd) { i_getopt_reset(); - doveadm_exit_code = 0; cmd->cmd(argc, (char **)argv); doveadm_cmd_server_post(conn, cmd->name); } @@ -299,6 +297,7 @@ cctx.local_port = conn->local_port; cctx.remote_port = conn->remote_port; cctx.conn = conn; + doveadm_exit_code = 0; flags = args[0]; cctx.username = args[1]; @@ -333,7 +332,7 @@ o_stream_nsend(conn->output, "\n-\n", 3); o_stream_uncork(conn->output); - /* flush the output and disconnect */ + /* flush the output and possibly run next command */ net_set_nonblock(conn->fd, FALSE); (void)o_stream_flush(conn->output); net_set_nonblock(conn->fd, TRUE);