From: Timo Sirainen Date: Thu, 11 Aug 2016 14:23:48 +0000 (+0300) Subject: doveadm sync: Fixed -S parameter parsing to actually work. X-Git-Tag: 2.3.0.rc1~3178 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11566139fe3dbe44404f5be8f2bfa0f3f97da69e;p=thirdparty%2Fdovecot%2Fcore.git doveadm sync: Fixed -S parameter parsing to actually work. --- 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)