const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct ProxyCurlTask *ctask = cls;
- struct ProxyUploadData *pdata = ctask->upload_data_head;
- GNUNET_assert (NULL == ctask->pp_match_head);
+ struct ProxyUploadData *pdata;
+ GNUNET_assert (NULL == ctask->pp_match_head);
if (NULL != ctask->headers)
curl_slist_free_all (ctask->headers);
if (NULL != ctask->post_handler)
MHD_destroy_post_processor (ctask->post_handler);
- for (; pdata != NULL; pdata = ctask->upload_data_head)
+ for (pdata = ctask->upload_data_head;; NULL != pdata; pdata = ctask->upload_data_head)
{
GNUNET_CONTAINER_DLL_remove (ctask->upload_data_head,
ctask->upload_data_tail,
GNUNET_free_non_null (pdata->value);
GNUNET_free (pdata);
}
-
-
GNUNET_free (ctask);
}
size_t max)
{
struct ProxyCurlTask *ctask = cls;
- struct ProxyREMatch *re_match = ctask->pp_match_head;
+ struct ProxyREMatch *re_match;
ssize_t copied = 0;
long long int bytes_to_copy = ctask->buffer_write_ptr - ctask->buffer_read_ptr;
return 0;
copied = 0;
- for (; NULL != re_match; re_match = ctask->pp_match_head)
+ for (re_match = ctask->pp_match_head; NULL != re_match; re_match = ctask->pp_match_head)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"MHD: Processing PP %s\n",
return copied;
}
+
/**
* Shorten result callback
*
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Running curl tasks: %d\n", running);
- ctask = ctasks_head;
- for (; ctask != NULL; ctask = ctask->next)
+ for (ctask = ctasks_head; NULL != ctask; ctask = ctask->next)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"CTask: %s\n", ctask->url);
do
{
- ctask = ctasks_head;
+
msg = curl_multi_info_read (curl_multi, &msgnum);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Messages left: %d\n", msgnum);
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Download curl failed");
- for (; ctask != NULL; ctask = ctask->next)
+ for (ctask = ctasks_head; NULL != ctask; ctask = ctask->next)
{
if (NULL == ctask->curl)
continue;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"CURL: download completed.\n");
- for (; ctask != NULL; ctask = ctask->next)
+ for (ctask = ctasks_head; NULL != ctask; ctask = ctask->next)
{
if (NULL == ctask->curl)
continue;
}
} while (msgnum > 0);
- for (ctask=clean_head; ctask != NULL; ctask = ctask->next)
+ for (ctask=clean_head; NULL != ctask; ctask = ctask->next)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"CURL: Removing task %s.\n", ctask->url);
}
num_ctasks=0;
- for (ctask=ctasks_head; ctask != NULL; ctask = ctask->next)
+ for (ctask=ctasks_head; NULL != ctask; ctask = ctask->next)
{
num_ctasks++;
}
curl_download_prepare();
}
+
/**
* Process LEHO lookup
*