changeset 19479:1f1fc5eb4a8e

doveadm-server: Reset getopt() before calling non-mail commands. This fixes parsing their parameters when using multiple such commands within a single doveadm connection.
author Timo Sirainen <tss@iki.fi>
date Mon, 07 Dec 2015 11:21:59 +0200
parents 33465d1d595c
children ed41702f14c2
files src/doveadm/client-connection.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/doveadm/client-connection.c	Sun Dec 06 20:48:55 2015 +0200
+++ b/src/doveadm/client-connection.c	Mon Dec 07 11:21:59 2015 +0200
@@ -46,6 +46,7 @@
 	const char *str = NULL;
 	unsigned int i;
 
+	optind = 1;
 	doveadm_exit_code = 0;
 	cmd->cmd(argc, argv);