]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm sync: Fixed -S parameter parsing to actually work.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 11 Aug 2016 14:23:48 +0000 (17:23 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 11 Aug 2016 14:24:09 +0000 (17:24 +0300)
src/doveadm/doveadm-dsync.c

index ff142f95ee967de0568c449772b93983ea477796..2e1453da06c6773e0fe314123c4728fb6a18a01b 100644 (file)
@@ -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)