From bbe0a0501959db1add350cae54b86cbd59d48c77 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 16 Jul 2020 20:36:12 +0200 Subject: avoid boolean argument in GNUNET_CURL_job_add(), see #6188 --- src/include/gnunet_curl_lib.h | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'src/include/gnunet_curl_lib.h') diff --git a/src/include/gnunet_curl_lib.h b/src/include/gnunet_curl_lib.h index 0bb337ee7..8f744512d 100644 --- a/src/include/gnunet_curl_lib.h +++ b/src/include/gnunet_curl_lib.h @@ -225,13 +225,9 @@ typedef void * upon its completion. Note that the context will make use of the * CURLOPT_PRIVATE facility of the CURL @a eh. * - * This function modifies the CURL handle to add the - * "Content-Type: application/json" header if @a add_json is set. - * * @param ctx context to execute the job in * @param eh curl easy handle for the request, will * be executed AND cleaned up - * @param add_json add "application/json" content type header * @param jcc callback to invoke upon completion * @param jcc_cls closure for @a jcc * @return NULL on error (in this case, @eh is still released!) @@ -239,11 +235,32 @@ typedef void struct GNUNET_CURL_Job * GNUNET_CURL_job_add (struct GNUNET_CURL_Context *ctx, CURL *eh, - int add_json, GNUNET_CURL_JobCompletionCallback jcc, void *jcc_cls); +/** + * Schedule a CURL request to be executed and call the given @a jcc + * upon its completion. Note that the context will make use of the + * CURLOPT_PRIVATE facility of the CURL @a eh. + * + * This function modifies the CURL handle to add the + * "Content-Type: application/json" header. + * + * @param ctx context to execute the job in + * @param eh curl easy handle for the request, will + * be executed AND cleaned up + * @param jcc callback to invoke upon completion + * @param jcc_cls closure for @a jcc + * @return NULL on error (in this case, @eh is still released!) + */ +struct GNUNET_CURL_Job * +GNUNET_CURL_job_add_with_ct_json (struct GNUNET_CURL_Context *ctx, + CURL *eh, + GNUNET_CURL_JobCompletionCallback jcc, + void *jcc_cls); + + /** * Force use of the provided username and password * for client authentication for all operations performed -- cgit v1.2.3