@cryptotaxi247 / netdata-1 / commits / 25121356d

support for names with slash

Costa Tsaousis (ktsaou) committed Mar 30, 2014 at 01:03 UTC 25121356deee8fa75630d96d2ae64dc80892956d
1 file changed +2
netdata.c
+2
@@ -402,6 +402,7 @@ RRD_STATS *rrd_stats_create(const char *id, const char *name, unsigned long entr
402
403 // check if there is a name for it in the environment
404 sprintf(st->envtitle, "NETDATA_TITLE_%s", st->id);
405 + while((p = strchr(st->envtitle, '/'))) *p = '_';
406 while((p = strchr(st->envtitle, '.'))) *p = '_';
407 while((p = strchr(st->envtitle, '-'))) *p = '_';
408 p = getenv(st->envtitle);
@@ -411,6 +412,7 @@ RRD_STATS *rrd_stats_create(const char *id, const char *name, unsigned long entr
412 st->usertitle[RRD_STATS_NAME_MAX] = '\0';
413
414 sprintf(st->envpriority, "NETDATA_PRIORITY_%s", st->id);
415 + while((p = strchr(st->envpriority, '/'))) *p = '_';
416 while((p = strchr(st->envpriority, '.'))) *p = '_';
417 while((p = strchr(st->envpriority, '-'))) *p = '_';
418 p = getenv(st->envpriority);