From 14002dcd6c6b15561a7c25925dccd93f911077e5 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Mon, 23 Apr 2018 09:52:55 +0200 Subject: Use news wrap curl functions. Change-Id: Idb05592f1deca3db9017c2717a5cc77d8880da2d Signed-off-by: Romain Forlot --- src/plugins/influxdb-writer.c | 2 +- src/plugins/influxdb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/influxdb-writer.c b/src/plugins/influxdb-writer.c index a236fe3..4ffa8c9 100644 --- a/src/plugins/influxdb-writer.c +++ b/src/plugins/influxdb-writer.c @@ -134,7 +134,7 @@ CURL *make_curl_write_post(const char *url, json_object *metricsJ) /* Check that we just do not broke the for loop before trying preparing CURL request object */ curl = i == lpd ? - curl_wrap_prepare_post(url, NULL, 1, " ", (const char * const*)post_data) : NULL; + curl_wrap_prepare_post_binary(url, NULL, " ", (const char * const*)post_data) : NULL; free(serie); free(post_data); diff --git a/src/plugins/influxdb.c b/src/plugins/influxdb.c index ebba4e1..77f78f7 100644 --- a/src/plugins/influxdb.c +++ b/src/plugins/influxdb.c @@ -62,7 +62,7 @@ int create_database() post_data[0] = "q=CREATE DATABASE \""DEFAULT_DB"\""; post_data[1] = NULL; - CURL *request = curl_wrap_prepare_post("localhost:"DEFAULT_DBPORT"/query",NULL, 1, ' ', post_data); + CURL *request = curl_wrap_prepare_post_binary("localhost:"DEFAULT_DBPORT"/query",NULL, " ", post_data); curl_wrap_perform(request, &result, &result_size); if(curl_wrap_response_code_get(request) != 200) { -- cgit 1.2.3-korg