Home | History | Annotate | Download | only in regression

Lines Matching refs:curl

21 #include <curl/curl.h>
304 * State needed by the curl callback.
305 * It takes data from curl, hashes it, and writes it to the file.
313 /** Create the curl state. */
349 /** Free the curl state. */
354 /** curl callback. Updates the hash, and writes to the file. */
363 CURL* curl,
368 if (curl_easy_setopt(curl, CURLOPT_URL, resource->url) != 0)
370 if (curl_easy_setopt(curl, CURLOPT_WRITEDATA, &cdata) != 0)
375 int const curl_err = curl_easy_perform(curl);
413 static int curl_download_datum(CURL* curl, data_t const* data) {
415 ret = curl_download_resource(curl, &data->data, data->type);
419 ret = curl_download_resource(curl, &data->dict, data_type_file);
432 CURL* curl = curl_easy_init();
435 if (curl == NULL)
438 if (curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1L) != 0)
440 if (curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L) != 0)
442 if (curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_write) != 0)
447 if (curl_download_datum(curl, *data) != 0)
453 curl_easy_cleanup(curl);