diff options
author | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2019-07-05 09:46:10 +0200 |
---|---|---|
committer | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2019-07-05 15:25:38 +0200 |
commit | 8d55c66257e0b949ee6daa9dc63f287f4ab9df40 (patch) | |
tree | 770a152933982140c45ea9bac10b209c7036203a /src | |
parent | 9ed5c8cc0f25e77e8ba79a3141ed36d9ff4d0a5e (diff) |
Fix DEFAULT_DBHOST setting (remove double column)
Bug introduced by previous commit 5de858ef8eb117fab.
Change-Id: I628b8b13ddbb8dc6a672f1d5378bf496d8ef8fd1
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/influxdb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/influxdb.c b/src/plugins/influxdb.c index f2f8fe1..5cc09b0 100644 --- a/src/plugins/influxdb.c +++ b/src/plugins/influxdb.c @@ -32,7 +32,7 @@ CTLP_ONLOAD(plugin, ret) int err = 0; char* result; size_t result_size; - CURL* request = curl_wrap_prepare_get("localhost:" DEFAULT_DBPORT "/ping", NULL, NULL); + CURL* request = curl_wrap_prepare_get(DEFAULT_DBHOST ":" DEFAULT_DBPORT "/ping", NULL, NULL); struct reader_args r_args = { NULL, NULL, 1000000 }; plugin->context = (void*)&r_args; @@ -54,7 +54,7 @@ CTLP_CAPI(influxdb_ping, source, argsJ, eventJ) char* result; size_t result_size; - CURL* curl_req = curl_wrap_prepare_get("localhost:" DEFAULT_DBPORT "/ping", NULL, NULL); + CURL* curl_req = curl_wrap_prepare_get(DEFAULT_DBHOST ":" DEFAULT_DBPORT "/ping", NULL, NULL); curl_wrap_perform(curl_req, &result, &result_size); @@ -99,7 +99,7 @@ int create_database(afb_req_t request) post_data[0] = "q=CREATE DATABASE \"" DEFAULT_DB "\""; post_data[1] = NULL; - CURL* curl_req = curl_wrap_prepare_post_unescaped("localhost:" DEFAULT_DBPORT "/query", NULL, " ", post_data); + CURL* curl_req = curl_wrap_prepare_post_unescaped(DEFAULT_DBHOST ":" DEFAULT_DBPORT "/query", NULL, " ", post_data); curl_wrap_perform(curl_req, &result, &result_size); if (curl_wrap_response_code_get(request) != 200) { |