summaryrefslogtreecommitdiff
path: root/src/pt
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-04-09 23:14:03 +0000
committerChristian Grothoff <christian@grothoff.org>2016-04-09 23:14:03 +0000
commit29e6158507a0758192075ac6ece7ba8e75ddc49a (patch)
treeb91ded48da322f8ba4c9bb0f5504228aa036c2d1 /src/pt
parent5dfcb058ab5db9ae0c4b147d8a99c64ca0980028 (diff)
small API change: do no longer pass rarely needed GNUNET_SCHEDULER_TaskContext to all scheduler tasks; instead, allow the relatively few tasks that need it to obtain the context via GNUNET_SCHEDULER_get_task_context()
Diffstat (limited to 'src/pt')
-rw-r--r--src/pt/gnunet-daemon-pt.c8
-rw-r--r--src/pt/test_gns_vpn.c13
-rw-r--r--src/pt/test_gnunet_vpn.c7
3 files changed, 10 insertions, 18 deletions
diff --git a/src/pt/gnunet-daemon-pt.c b/src/pt/gnunet-daemon-pt.c
index c377c3f90..a86cbd316 100644
--- a/src/pt/gnunet-daemon-pt.c
+++ b/src/pt/gnunet-daemon-pt.c
@@ -800,11 +800,9 @@ transmit_dns_request_to_cadet (void *cls,
* Task run if the time to answer a DNS request via CADET is over.
*
* @param cls the `struct RequestContext` to abort
- * @param tc scheduler context
*/
static void
-timeout_request (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+timeout_request (void *cls)
{
struct RequestContext *rc = cls;
struct CadetExit *exit = rc->exit;
@@ -1023,11 +1021,9 @@ abort_all_requests (struct CadetExit *exit)
* Function scheduled as very last function, cleans up after us
*
* @param cls closure, NULL
- * @param tskctx scheduler context, unused
*/
static void
-cleanup (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tskctx)
+cleanup (void *cls)
{
struct CadetExit *exit;
diff --git a/src/pt/test_gns_vpn.c b/src/pt/test_gns_vpn.c
index f1ddcddc2..c0d50d177 100644
--- a/src/pt/test_gns_vpn.c
+++ b/src/pt/test_gns_vpn.c
@@ -140,8 +140,7 @@ mhd_ahc (void *cls,
static void
-do_shutdown (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *c)
+do_shutdown (void *cls)
{
if (mhd_task_id != NULL)
{
@@ -181,8 +180,7 @@ curl_main (void);
static void
-curl_task (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+curl_task (void *cls)
{
curl_task_id = NULL;
curl_main ();
@@ -264,7 +262,7 @@ curl_main ()
static void
-start_curl (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+start_curl (void *cls)
{
GNUNET_asprintf (&url,
"http://%s/hello_world",
@@ -289,7 +287,7 @@ start_curl (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
static void
-disco_ns (void* cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+disco_ns (void* cls)
{
GNUNET_NAMESTORE_disconnect (namestore);
namestore = NULL;
@@ -340,8 +338,7 @@ mhd_main (void);
static void
-mhd_task (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+mhd_task (void *cls)
{
mhd_task_id = NULL;
MHD_run (mhd);
diff --git a/src/pt/test_gnunet_vpn.c b/src/pt/test_gnunet_vpn.c
index b5bc1395b..85b28fbf8 100644
--- a/src/pt/test_gnunet_vpn.c
+++ b/src/pt/test_gnunet_vpn.c
@@ -171,8 +171,7 @@ do_shutdown ()
* Function to run the HTTP client.
*/
static void
-curl_main (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+curl_main (void *cls)
{
fd_set rs;
fd_set ws;
@@ -304,7 +303,7 @@ mhd_main (void);
static void
-mhd_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+mhd_task (void *cls)
{
mhd_task_id = NULL;
MHD_run (mhd);
@@ -313,7 +312,7 @@ mhd_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
static void
-ctrl_c_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+ctrl_c_shutdown (void *cls)
{
ctrl_c_task_id = NULL;
do_shutdown ();