From 39ee05cf0fac091572a235cb23daed7bb68f5a8f Mon Sep 17 00:00:00 2001 From: Sebastien Douheret Date: Sat, 20 Jul 2019 13:30:50 +0200 Subject: Allow to set host+port using params in config.json Default influxDB host and port can now be set using params field of plugins section of harvester-config.json file. For example : "plugins": [ { "uid": "influxdb", "info": "Plugins that handle influxdb read and write", "libs": "influxdb.ctlso", "params": { "host": "localhost", "port": 8086 } } ], Change-Id: Iff0fffe1d0883304413d887986991a207b840aa7 Signed-off-by: Sebastien Douheret --- src/plugins/influxdb-writer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/influxdb-writer.c') diff --git a/src/plugins/influxdb-writer.c b/src/plugins/influxdb-writer.c index 2ef3813..3838036 100644 --- a/src/plugins/influxdb-writer.c +++ b/src/plugins/influxdb-writer.c @@ -142,13 +142,13 @@ CURL* make_curl_write_post(afb_api_t apiHandle, const char* url, json_object* me /* Check that we just do not broke the for loop before trying preparing CURL request object */ curl = i == lpd ? curl_wrap_prepare_post_unescaped(url, NULL, "\n", (const char* const*)post_data) : NULL; - free(serie); + free(serie); for (i = 0; i < lpd; i++) { if (post_data[i]) { free(post_data[i]); } } - free(post_data); + free(post_data); return curl; } -- cgit 1.2.3-korg