]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm-stats: Print numbers as numbers
authorAki Tuomi <aki.tuomi@dovecot.fi>
Tue, 6 Nov 2018 11:06:49 +0000 (13:06 +0200)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 10 Sep 2019 07:01:40 +0000 (10:01 +0300)
Prevents treating numbers as string in JSON printer

src/doveadm/doveadm-stats.c

index b6bb4fff4b1f05930837964b2479693b604c1115..f727c569be0cd398cfc6b30a574b8a28a736bf77 100644 (file)
@@ -83,7 +83,7 @@ static void stats_dump(const char *path, const char *const *fields, bool reset)
        doveadm_print_header_simple("metric_name");
        doveadm_print_header_simple("field");
        for (i = 0; i < fields_count; i++)
-               doveadm_print_header_simple(fields[i]);
+               doveadm_print_header(fields[i], fields[i], DOVEADM_PRINT_HEADER_FLAG_NUMBER);
 
        while ((line = i_stream_read_next_line(input)) != NULL) {
                if (line[0] == '\0')