dovecot-2.2: doveadm who: If parameters are invalid, print help ...

dovecot at dovecot.org dovecot at dovecot.org
Tue Nov 11 23:08:53 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/e4a3e8554663
changeset: 18058:e4a3e8554663
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Nov 12 00:52:44 2014 +0200
description:
doveadm who: If parameters are invalid, print help text for who command instead of the whole doveadm usage.

diffstat:

 src/doveadm/doveadm-who.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r b8a7fec1beeb -r e4a3e8554663 src/doveadm/doveadm-who.c
--- a/src/doveadm/doveadm-who.c	Wed Nov 12 00:20:40 2014 +0200
+++ b/src/doveadm/doveadm-who.c	Wed Nov 12 00:52:44 2014 +0200
@@ -119,12 +119,12 @@
 	while (args[1] != NULL) {
 		if (net_parse_range(args[1], &net_ip, &net_bits) == 0) {
 			if (ctx->filter.net_bits != 0)
-				usage();
+				help(&doveadm_cmd_who);
 			ctx->filter.net_ip = net_ip;
 			ctx->filter.net_bits = net_bits;
 		} else {
 			if (ctx->filter.username != NULL)
-				usage();
+				help(&doveadm_cmd_who);
 			ctx->filter.username = args[1];
 		}
 		args++;


More information about the dovecot-cvs mailing list