From 4a255059678c8a73a453f9276de217b7cfd384f7 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 2 May 2016 06:15:26 +0000 Subject: [PATCH] fix API design issue --- src/curl/curl_reschedule.c | 7 ++++--- src/include/gnunet_curl_lib.h | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) 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); -- 2.25.1