aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/influxdb.c
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2019-03-29 15:56:10 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2019-04-01 11:44:53 +0200
commitf6e6432ed03ff76868efe57396036d3124881069 (patch)
treef69013eeb924ce7350de2ceab9b6ae03b1e4f80e /src/plugins/influxdb.c
parentfb1f28adcf1cf90606ac31425e9370edfa9e70c2 (diff)
Git submodule migration to separated libraries
- Replace controller binder functions definition with the binder ones. and remove the last used submodules to use the separated libraries. Bug-AGL: SPEC-2139 Change-Id: I0e354757dec692c13b49f02226fcf891953667f5 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/plugins/influxdb.c')
-rw-r--r--src/plugins/influxdb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/influxdb.c b/src/plugins/influxdb.c
index 92f1f89..2cfd551 100644
--- a/src/plugins/influxdb.c
+++ b/src/plugins/influxdb.c
@@ -40,7 +40,7 @@ CTLP_ONLOAD(plugin, ret)
curl_wrap_perform(request, &result, &result_size);
if (curl_wrap_response_code_get(request) != 204) {
- AFB_ApiError(plugin->api, "InfluxDB not reachable, please start it");
+ AFB_API_ERROR(plugin->api, "InfluxDB not reachable, please start it");
err = ERROR;
}
@@ -59,10 +59,10 @@ CTLP_CAPI(influxdb_ping, source, argsJ, eventJ)
curl_wrap_perform(curl_req, &result, &result_size);
if (curl_wrap_response_code_get(curl_req) != 204) {
- AFB_ApiError(source->api, "InfluxDB is offline.");
+ AFB_API_ERROR(source->api, "InfluxDB is offline.");
ret = ERROR;
} else {
- AFB_ApiNotice(source->api, "InfluxDB is up and running.");
+ AFB_API_NOTICE(source->api, "InfluxDB is up and running.");
}
curl_easy_cleanup(curl_req);
@@ -88,7 +88,7 @@ size_t make_url(char* url, size_t l_url, const char* host, const char* port, con
return strlen(url);
}
-int create_database(AFB_ReqT request)
+int create_database(afb_req_t request)
{
int ret = 0;
char* result;
@@ -103,14 +103,14 @@ int create_database(AFB_ReqT request)
curl_wrap_perform(curl_req, &result, &result_size);
if (curl_wrap_response_code_get(request) != 200) {
- AFB_ReqError(request, "Can't create database.");
+ AFB_REQ_ERROR(request, "Can't create database.");
ret = ERROR;
}
curl_easy_cleanup(curl_req);
if (ret == 0)
- AFB_ReqNotice(request, "Database '" DEFAULT_DB "' created");
+ AFB_REQ_NOTICE(request, "Database '" DEFAULT_DB "' created");
return ret;
}