From: Christian Grothoff Date: Mon, 2 May 2016 06:15:26 +0000 (+0000) Subject: fix API design issue X-Git-Tag: initial-import-from-subversion-38251~931 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4a255059678c8a73a453f9276de217b7cfd384f7;p=oweals%2Fgnunet.git fix API design issue --- diff --git a/src/curl/curl_reschedule.c b/src/curl/curl_reschedule.c index 3e6c887f3..fab66765e 100644 --- a/src/curl/curl_reschedule.c +++ b/src/curl/curl_reschedule.c @@ -75,7 +75,7 @@ GNUNET_CURL_gnunet_rc_destroy (struct GNUNET_CURL_RescheduleContext *rc) /** * Task that runs the context's event loop with the GNUnet scheduler. * - * @param cls the `struct GNUNET_CURL_RescheduleContext` + * @param cls a `struct GNUNET_CURL_RescheduleContext *` */ static void context_task (void *cls) @@ -133,12 +133,13 @@ context_task (void *cls) * Note that you MUST immediately destroy the reschedule context after * calling #GNUNET_CURL_fini(). * - * @param cls must point to a `struct GNUNET_CURL_RescheduleContext` + * @param cls must point to a `struct GNUNET_CURL_RescheduleContext *` + * (pointer to a pointer!) */ void GNUNET_CURL_gnunet_scheduler_reschedule (void *cls) { - struct GNUNET_CURL_RescheduleContext *rc = cls; + struct GNUNET_CURL_RescheduleContext *rc = *(void**) cls; if (NULL != rc->task) GNUNET_SCHEDULER_cancel (rc->task); diff --git a/src/include/gnunet_curl_lib.h b/src/include/gnunet_curl_lib.h index 500434d82..2b13ee3d9 100644 --- a/src/include/gnunet_curl_lib.h +++ b/src/include/gnunet_curl_lib.h @@ -204,7 +204,8 @@ GNUNET_CURL_gnunet_rc_destroy (struct GNUNET_CURL_RescheduleContext *rc); * Note that you MUST immediately destroy the reschedule context after * calling #GNUNET_CURL_fini(). * - * @param cls must point to a `struct GNUNET_CURL_RescheduleContext` + * @param cls must point to a `struct GNUNET_CURL_RescheduleContext *` + * (pointer to a pointer!) */ void GNUNET_CURL_gnunet_scheduler_reschedule (void *cls);