]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
Fix json output when printing legend entries
authorJulien Thomas <jthomas@exosec.fr>
Fri, 8 Nov 2013 00:07:16 +0000 (01:07 +0100)
committerJulien Thomas <jthomas@exosec.fr>
Fri, 8 Nov 2013 00:07:16 +0000 (01:07 +0100)
Branch 1.4 is missing this patch in order to produce valid json output.
This is related to issue #380 reported by apfeiffe.

src/rrd_tool.c

index ddcdccccecc98c535ca1acaa13a64358d99ed0f7..57e22ce0d6c1278985d0e0630ca73946d3b3d39e 100644 (file)
@@ -766,7 +766,7 @@ int HandleInputLine(
                 char     *entry = NULL;
                 entry = legend_v[j];
                 if (json){
-                    printf("      '%s'", entry);
+                    printf("      \"%s\"", entry);
                     if (j < col_cnt -1){
                         printf(",");
                     }