summaryrefslogtreecommitdiffstats
path: root/src/collectors/tc.plugin/plugin_tc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/collectors/tc.plugin/plugin_tc.c')
-rw-r--r--src/collectors/tc.plugin/plugin_tc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/collectors/tc.plugin/plugin_tc.c b/src/collectors/tc.plugin/plugin_tc.c
index da2a39194..7102e216d 100644
--- a/src/collectors/tc.plugin/plugin_tc.c
+++ b/src/collectors/tc.plugin/plugin_tc.c
@@ -912,7 +912,7 @@ void *tc_main(void *ptr) {
uint32_t first_hash;
snprintfz(command, TC_LINE_MAX, "%s/tc-qos-helper.sh", netdata_configured_primary_plugins_dir);
- char *tc_script = config_get("plugin:tc", "script to run to get tc values", command);
+ const char *tc_script = config_get("plugin:tc", "script to run to get tc values", command);
while(service_running(SERVICE_COLLECTORS)) {
struct tc_device *device = NULL;
@@ -928,7 +928,7 @@ void *tc_main(void *ptr) {
}
char buffer[TC_LINE_MAX+1] = "";
- while(fgets(buffer, TC_LINE_MAX, tc_child_instance->child_stdout_fp) != NULL) {
+ while(fgets(buffer, TC_LINE_MAX, spawn_popen_stdout(tc_child_instance)) != NULL) {
if(unlikely(!service_running(SERVICE_COLLECTORS))) break;
buffer[TC_LINE_MAX] = '\0';