diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-06-09 04:52:47 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-06-09 04:52:57 +0000 |
commit | 00151562145df50cc65e9902d52d5fa77f89fe50 (patch) | |
tree | 2737716802f6725a5074d606ec8fe5422c58a83c /daemon/analytics.c | |
parent | Releasing debian version 1.34.1-1. (diff) | |
download | netdata-00151562145df50cc65e9902d52d5fa77f89fe50.tar.xz netdata-00151562145df50cc65e9902d52d5fa77f89fe50.zip |
Merging upstream version 1.35.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'daemon/analytics.c')
-rw-r--r-- | daemon/analytics.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/daemon/analytics.c b/daemon/analytics.c index 0af41fdda..6c02561d0 100644 --- a/daemon/analytics.c +++ b/daemon/analytics.c @@ -249,8 +249,9 @@ void analytics_exporters(void) buffer_free(bi); } -int collector_counter_callb(void *entry, void *data) -{ +int collector_counter_callb(const char *name, void *entry, void *data) { + (void)name; + struct array_printer *ap = (struct array_printer *)data; struct collector *col = (struct collector *)entry; @@ -296,7 +297,7 @@ void analytics_collectors(void) ap.c = 0; ap.both = bt; - dictionary_get_all(dict, collector_counter_callb, &ap); + dictionary_walkthrough_read(dict, collector_counter_callb, &ap); dictionary_destroy(dict); analytics_set_data(&analytics_data.netdata_collectors, (char *)buffer_tostring(ap.both)); @@ -701,7 +702,7 @@ void get_system_timezone(void) // http://stackoverflow.com/questions/4554271/how-to-avoid-excessive-stat-etc-localtime-calls-in-strftime-on-linux const char *tz = getenv("TZ"); if (!tz || !*tz) - setenv("TZ", config_get(CONFIG_SECTION_GLOBAL, "TZ environment variable", ":/etc/localtime"), 0); + setenv("TZ", config_get(CONFIG_SECTION_ENV_VARS, "TZ", ":/etc/localtime"), 0); char buffer[FILENAME_MAX + 1] = ""; const char *timezone = NULL; @@ -908,13 +909,13 @@ void set_global_environment() if (!p) p = "/bin:/usr/bin"; snprintfz(path, 1024, "%s:%s", p, "/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin"); - setenv("PATH", config_get(CONFIG_SECTION_PLUGINS, "PATH environment variable", path), 1); + setenv("PATH", config_get(CONFIG_SECTION_ENV_VARS, "PATH", path), 1); // python options p = getenv("PYTHONPATH"); if (!p) p = ""; - setenv("PYTHONPATH", config_get(CONFIG_SECTION_PLUGINS, "PYTHONPATH environment variable", p), 1); + setenv("PYTHONPATH", config_get(CONFIG_SECTION_ENV_VARS, "PYTHONPATH", p), 1); // disable buffering for python plugins setenv("PYTHONUNBUFFERED", "1", 1); |