Added a new FETCH_CALLBACK option to fetch data without allocation

This commit is contained in:
Martin Willi
2011-04-04 08:48:27 +02:00
parent 5131c62517
commit 13eda8e903
7 changed files with 97 additions and 22 deletions
@@ -62,10 +62,11 @@ static size_t append(void *ptr, size_t size, size_t nmemb, chunk_t *data)
}
METHOD(fetcher_t, fetch, status_t,
private_curl_fetcher_t *this, char *uri, chunk_t *result)
private_curl_fetcher_t *this, char *uri, void *userdata)
{
char error[CURL_ERROR_SIZE];
status_t status;
chunk_t *result = userdata;
*result = chunk_empty;