From 11566139fe3dbe44404f5be8f2bfa0f3f97da69e Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 11 Aug 2016 17:23:48 +0300 Subject: [PATCH] doveadm sync: Fixed -S parameter parsing to actually work. --- src/doveadm/doveadm-dsync.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/doveadm/doveadm-dsync.c b/src/doveadm/doveadm-dsync.c index ff142f95ee..2e1453da06 100644 --- a/src/doveadm/doveadm-dsync.c +++ b/src/doveadm/doveadm-dsync.c @@ -957,7 +957,7 @@ static bool 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': @@ -1041,8 +1041,8 @@ cmd_mailbox_dsync_parse_arg(struct doveadm_mail_cmd_context *_ctx, int c) 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) -- 2.47.3