From 052d8eccb58dea60f4f39eae760cedda846ec0ef Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Wed, 31 Jan 2024 21:11:50 +0100 Subject: [PATCH] fix empty post start stop --- src/kds_s2000w_client.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/kds_s2000w_client.c b/src/kds_s2000w_client.c index 2542550..d209eea 100644 --- a/src/kds_s2000w_client.c +++ b/src/kds_s2000w_client.c @@ -144,6 +144,7 @@ int kds_s2000w_client_start_scan(int64_t sessionid, response* response) curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); curl_easy_setopt(curl, CURLOPT_URL, url); curl_easy_setopt(curl, CURLOPT_POST, 1L); + curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 0L); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, _kds_s2000w_client_callback); curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void*) response); CURLcode result = curl_easy_perform(curl); @@ -175,6 +176,7 @@ int kds_s2000w_client_stop_scan(int64_t sessionid, response* response) curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); curl_easy_setopt(curl, CURLOPT_URL, url); curl_easy_setopt(curl, CURLOPT_POST, 1L); + curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 0L); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, _kds_s2000w_client_callback); curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void*) response); CURLcode result = curl_easy_perform(curl); -- 2.39.5