]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
fix empty post start stop
authorBastian Dehn <hhaalo@arcor.de>
Wed, 31 Jan 2024 20:11:50 +0000 (21:11 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Wed, 31 Jan 2024 20:11:50 +0000 (21:11 +0100)
src/kds_s2000w_client.c

index 2542550eb46f26f2718bdf769dcf569515e65c10..d209eea668ba79c913148266df52880481db12fb 100644 (file)
@@ -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);