changeset 20634:a1897e1b0337

doveadm sync: Fixed -S parameter parsing to actually work.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Thu, 11 Aug 2016 17:23:48 +0300
parents d54651ba988a
children 949d3a1ca80b
files src/doveadm/doveadm-dsync.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/doveadm/doveadm-dsync.c	Fri Jul 01 14:30:24 2016 +0300
+++ b/src/doveadm/doveadm-dsync.c	Thu Aug 11 17:23:48 2016 +0300
@@ -955,7 +955,7 @@
 cmd_mailbox_dsync_parse_arg(struct doveadm_mail_cmd_context *_ctx, int c)
 {
 	struct dsync_cmd_context *ctx = (struct dsync_cmd_context *)_ctx;
-	const char *str;
+	const char *str, *error;
 
 	switch (c) {
 	case '1':
@@ -1039,8 +1039,8 @@
 			i_fatal("Invalid -t parameter: %s", optarg);
 		break;
 	case 'S':
-		if (settings_parse_size(optarg, &ctx->sync_max_size) < 0)
-			i_fatal("Invalid -S parameter: %s", optarg);
+		if (settings_get_size(optarg, &ctx->sync_max_size, &error) < 0)
+			i_fatal("Invalid -S parameter '%s': %s", optarg, error);
 		break;
 	case 'T':
 		if (str_to_uint(optarg, &ctx->io_timeout_secs) < 0)