From: Timo Sirainen Date: Mon, 7 Dec 2015 09:21:59 +0000 (+0200) Subject: doveadm-server: Reset getopt() before calling non-mail commands. X-Git-Tag: 2.2.20~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc314720009449ca9da54bd69365edad2fcf4e60;p=thirdparty%2Fdovecot%2Fcore.git doveadm-server: Reset getopt() before calling non-mail commands. This fixes parsing their parameters when using multiple such commands within a single doveadm connection. --- diff --git a/src/doveadm/client-connection.c b/src/doveadm/client-connection.c index 2338ca7e82..5094d09553 100644 --- a/src/doveadm/client-connection.c +++ b/src/doveadm/client-connection.c @@ -46,6 +46,7 @@ doveadm_cmd_server_run(struct client_connection *conn, const char *str = NULL; unsigned int i; + optind = 1; doveadm_exit_code = 0; cmd->cmd(argc, argv);