@cryptotaxi247 / netdata-1 / commits / 5f8010360

fix for invalid JSON generation #329, #347

Costa Tsaousis (ktsaou) committed May 1, 2016 at 21:35 UTC 5f80103605bdf401d20d6a62bee9a80a366a94b6
1 file changed +3 -1
src/sys_fs_cgroup.c
+3 -1
@@ -614,13 +614,15 @@ void cgroup_get_chart_id(struct cgroup *cg) {
614 if(!cg->chart_title)
615 fatal("CGROUP: Cannot allocate memory for chart name of cgroup '%s' chart name: '%s'", cg->id, s);
616
617 - netdata_fix_chart_id(s);
617 + netdata_fix_chart_name(cg->chart_title);
618
619 free(cg->chart_id);
620 cg->chart_id = strdup(s);
621 if(!cg->chart_id)
622 fatal("CGROUP: Cannot allocate memory for chart id of cgroup '%s' chart id: '%s'", cg->id, s);
623
624 + netdata_fix_chart_id(cg->chart_id);
625 +
626 debug(D_CGROUP, "cgroup '%s' renamed to '%s' (title: '%s')", cg->id, cg->chart_id, cg->chart_title);
627 }
628 else debug(D_CGROUP, "cgroup '%s' is not to be renamed (will be shown as '%s')", cg->id, cg->chart_id);