*/
#include "platform.h"
#include <jansson.h>
+#include <microhttpd.h>
#include "gnunet_curl_lib.h"
#if ENABLE_BENCHMARK
* @return library context
*/
struct GNUNET_CURL_Context *
-GNUNET_CURL_init (GNUNET_CURL_RescheduleCallback cb, void *cb_cls)
+GNUNET_CURL_init (GNUNET_CURL_RescheduleCallback cb,
+ void *cb_cls)
{
struct GNUNET_CURL_Context *ctx;
CURLM *multi;
* @return number of bytes processed from @a bufptr
*/
static size_t
-download_cb (char *bufptr, size_t size, size_t nitems, void *cls)
+download_cb (char *bufptr,
+ size_t size,
+ size_t nitems,
+ void *cls)
{
struct GNUNET_CURL_DownloadBuffer *db = cls;
size_t msize;
}
job->easy_handle = eh;
job->ctx = ctx;
- GNUNET_CONTAINER_DLL_insert (ctx->jobs_head, ctx->jobs_tail, job);
+ GNUNET_CONTAINER_DLL_insert (ctx->jobs_head,
+ ctx->jobs_tail,
+ job);
return job;
}
curl_slist_append (NULL, "Content-Type: application/json")));
}
- job = GNUNET_CURL_job_add2 (ctx, eh, job_headers, jcc, jcc_cls);
+ job = GNUNET_CURL_job_add2 (ctx,
+ eh,
+ job_headers,
+ jcc,
+ jcc_cls);
curl_slist_free_all (job_headers);
return job;
}
(const char *) db->buf);
return NULL;
}
+ if (MHD_HTTP_NO_CONTENT == *response_code)
+ return NULL;
json = NULL;
if (0 == db->eno)
{