diff options
Diffstat (limited to 'src/plugins/influxdb.c')
-rw-r--r-- | src/plugins/influxdb.c | 12 |
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; } |