From 89daff335a418fb67ce8ea4d3e1e128e96d19877 Mon Sep 17 00:00:00 2001 From: Sree Harsha Totakura Date: Tue, 17 Jul 2012 19:09:02 +0000 Subject: helper exception callback lesser parameters --- src/include/gnunet_helper_lib.h | 6 +----- src/testbed/test_testbed_api_hosts.c | 5 +---- src/testbed/testbed_api.c | 5 +---- src/testbed/testbed_api_hosts.c | 7 ++----- src/util/helper.c | 6 +++--- 5 files changed, 8 insertions(+), 21 deletions(-) diff --git a/src/include/gnunet_helper_lib.h b/src/include/gnunet_helper_lib.h index 2756cdf4e..12a4d3fe1 100644 --- a/src/include/gnunet_helper_lib.h +++ b/src/include/gnunet_helper_lib.h @@ -42,12 +42,8 @@ struct GNUNET_HELPER_Handle; * when the helper process is stoped using GNUNET_HELPER_stop() * * @param cls the closure from GNUNET_HELPER_start() - * @param h the handle representing the helper process. This handle is invalid - * in this callback. It is only presented for reference. No operations - * can be performed using it. */ -typedef void (*GNUNET_HELPER_ExceptionCallback) (void *cls, - const struct GNUNET_HELPER_Handle *h); +typedef void (*GNUNET_HELPER_ExceptionCallback) (void *cls); /** diff --git a/src/testbed/test_testbed_api_hosts.c b/src/testbed/test_testbed_api_hosts.c index add3a1e02..54e2461c7 100644 --- a/src/testbed/test_testbed_api_hosts.c +++ b/src/testbed/test_testbed_api_hosts.c @@ -72,12 +72,9 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) * when the helper process is stoped using GNUNET_HELPER_stop() * * @param cls the closure from GNUNET_HELPER_start() - * @param h the handle representing the helper process. This handle is invalid - * in this callback. It is only presented for reference. No operations - * can be performed using it. */ static void -exp_cb (void *cls, const struct GNUNET_HELPER_Handle *h) +exp_cb (void *cls) { status = GNUNET_SYSERR; GNUNET_SCHEDULER_cancel (shutdown_id); diff --git a/src/testbed/testbed_api.c b/src/testbed/testbed_api.c index 7c4436003..aa410e010 100644 --- a/src/testbed/testbed_api.c +++ b/src/testbed/testbed_api.c @@ -447,12 +447,9 @@ struct GNUNET_TESTBED_ControllerProc * when the helper process is stoped using GNUNET_HELPER_stop() * * @param cls the closure from GNUNET_HELPER_start() - * @param h the handle representing the helper process. This handle is invalid - * in this callback. It is only presented for reference. No operations - * can be performed using it. */ static void -controller_exp_cb (void *cls, const struct GNUNET_HELPER_Handle *h) +controller_exp_cb (void *cls) { struct GNUNET_TESTBED_ControllerProc *cproc = cls; diff --git a/src/testbed/testbed_api_hosts.c b/src/testbed/testbed_api_hosts.c index 5fe525b9e..f88da52b8 100644 --- a/src/testbed/testbed_api_hosts.c +++ b/src/testbed/testbed_api_hosts.c @@ -357,18 +357,15 @@ clear_msg (void *cls, int result) * when the helper process is stoped using GNUNET_HELPER_stop() * * @param cls the closure from GNUNET_HELPER_start() - * @param h the handle representing the helper process. This handle is invalid - * in this callback. It is only presented for reference. No operations - * can be performed using it. */ static void -helper_exp_cb (void *cls, const struct GNUNET_HELPER_Handle *h) +helper_exp_cb (void *cls) { struct GNUNET_TESTBED_HelperHandle *handle = cls; handle->is_stopped = GNUNET_YES; GNUNET_TESTBED_host_stop_ (handle); - handle->exp_cb (handle->exp_cb_cls, h); + handle->exp_cb (handle->exp_cb_cls); } diff --git a/src/util/helper.c b/src/util/helper.c index 3fe3705b1..82b94aa2f 100644 --- a/src/util/helper.c +++ b/src/util/helper.c @@ -256,7 +256,7 @@ helper_read (void *cls, STRERROR (errno)); if (NULL != h->exp_cb) { - h->exp_cb (h->cb_cls, h); + h->exp_cb (h->cb_cls); GNUNET_HELPER_stop (h); return; } @@ -275,7 +275,7 @@ helper_read (void *cls, h->binary_name); if (NULL != h->exp_cb) { - h->exp_cb (h->cb_cls, h); + h->exp_cb (h->cb_cls); GNUNET_HELPER_stop (h); return; } @@ -300,7 +300,7 @@ helper_read (void *cls, h->binary_name); if (NULL != h->exp_cb) { - h->exp_cb (h->cb_cls, h); + h->exp_cb (h->cb_cls); GNUNET_HELPER_stop (h); return; } -- cgit v1.2.3