diff options
author | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2019-07-05 09:46:10 +0200 |
---|---|---|
committer | Sebastien Douheret <sebastien.douheret@iot.bzh> | 2019-08-01 17:45:11 +0200 |
commit | 95ea5e667f0127b504323c3ea53805dc71e58f66 (patch) | |
tree | 374accd651b60b77fc1719562920e38b133b42e2 | |
parent | 132d8131ae287bb0ab148aef545b9337e9703db6 (diff) |
Fix DEFAULT_DBHOST setting (remove double column)
Bug introduced by previous commit 5de858ef8eb117fab.
Change-Id: I628b8b13ddbb8dc6a672f1d5378bf496d8ef8fd1
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
-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) { |