From: Marat Salimzianov Date: Wed, 21 Nov 2018 21:07:21 +0000 (+0100) Subject: Added a comma to the list of prohibited characters X-Git-Tag: collectd-5.11.0~14^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f2b5f2065600cbb7013a80e8e8c7cfa198eb065;p=thirdparty%2Fcollectd.git Added a comma to the list of prohibited characters --- diff --git a/src/utils_format_graphite.c b/src/utils_format_graphite.c index de3f0c2e7..a20ca30e5 100644 --- a/src/utils_format_graphite.c +++ b/src/utils_format_graphite.c @@ -29,7 +29,7 @@ #include "utils_cache.h" #include "utils_format_graphite.h" -#define GRAPHITE_FORBIDDEN " \t\"\\:!/()\n\r" +#define GRAPHITE_FORBIDDEN " \t\"\\:!,/()\n\r" /* Utils functions to format data sets in graphite format. * Largely taken from write_graphite.c as it remains the same formatting */ diff --git a/src/utils_format_graphite_test.c b/src/utils_format_graphite_test.c index 42efa6816..2dff0c530 100644 --- a/src/utils_format_graphite_test.c +++ b/src/utils_format_graphite_test.c @@ -81,6 +81,11 @@ DEF_TEST(metric_name) { .type_instance = "test: \"hello\"", .want_name = "example@com.test-foo@@test@.single-test@@@hello@", }, + { + .plugin_instance = "foo (test)", + .type_instance = "test: \"hello\"", + .want_name = "example,com.test-foo,,test,.single-test,,,hello,", + }, /* flag GRAPHITE_SEPARATE_INSTANCES */ { .plugin_instance = "foo",