From: Bastian Dehn Date: Wed, 31 Jan 2024 20:11:50 +0000 (+0100) Subject: fix empty post start stop X-Git-Tag: v1.0.0^2~371 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=052d8eccb58dea60f4f39eae760cedda846ec0ef;p=sane-kds-s2000w-net.git fix empty post start stop --- 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);