allow label names to have slashes (#13125)
* allow label names to have slashes * fixed flipped comment
Costa Tsaousis committed
Jun 14, 2022 at 15:59 UTC
f383e57646fed8432157b035dc775f297c398114
1 file changed
+6
-7
database/rrdlabels.c
+6
-7
@@ -22,12 +22,12 @@
22
* Equal = -> : -> _
23
* Period . yes yes
24
* Comma , -> . -> .
25
- * Slash / yes -> _
26
- * Backslash \ -> / -> _
25
+ * Slash / yes yes
26
+ * Backslash \ -> / -> /
27
* At @ yes -> _
28
- * Space -> _ yes
29
- * Opening parenthesis ( -> _ yes
30
- * Closing parenthesis ) -> _ yes
28
+ * Space yes -> _
29
+ * Opening parenthesis ( yes -> _
30
+ * Closing parenthesis ) yes -> _
31
* anything else -> _ -> _
32
*
33
* The above rules should allow users to set in tags (indicative):
@@ -358,11 +358,10 @@ __attribute__((constructor)) void initialize_labels_keys_char_map(void) {
358
label_names_char_map['+'] = '_';
359
label_names_char_map[';'] = '_';
360
label_names_char_map['@'] = '_';
361
- label_names_char_map['/'] = '_';
361
label_names_char_map['('] = '_';
362
label_names_char_map[')'] = '_';
363
label_names_char_map[' '] = '_';
365
- label_names_char_map['\\'] = '_';
364
+ label_names_char_map['\\'] = '/';
365
366
// create the spaces map
367
for(i = 0; i < 256 ;i++)