aboutsummaryrefslogtreecommitdiff
path: root/src/identity
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-04-30 08:17:37 +0000
committerChristian Grothoff <christian@grothoff.org>2016-04-30 08:17:37 +0000
commit95f9076a2139f5fb042b944a0658b6cda2fa35db (patch)
treeb0826a2a1dcf812e6b4450fe6b05d47cd53ae49d /src/identity
parent7746f68db77b9ca3c4aaca24ab2ce5253461240b (diff)
implementing new scheduler shutdown semantics
Diffstat (limited to 'src/identity')
-rw-r--r--src/identity/gnunet-identity.c3
-rw-r--r--src/identity/gnunet-service-identity.c4
-rw-r--r--src/identity/plugin_rest_identity.c8
-rw-r--r--src/identity/test_identity.c3
4 files changed, 9 insertions, 9 deletions
diff --git a/src/identity/gnunet-identity.c b/src/identity/gnunet-identity.c
index dc9174d21c..23c20d91fd 100644
--- a/src/identity/gnunet-identity.c
+++ b/src/identity/gnunet-identity.c
@@ -302,8 +302,7 @@ run (void *cls, char *const *args, const char *cfgfile,
create_ego,
&create_finished,
&create_op);
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
- &shutdown_task, NULL);
+ GNUNET_SCHEDULER_add_shutdown (&shutdown_task, NULL);
test_finished ();
}
diff --git a/src/identity/gnunet-service-identity.c b/src/identity/gnunet-service-identity.c
index d36319a99a..9185aac64d 100644
--- a/src/identity/gnunet-service-identity.c
+++ b/src/identity/gnunet-service-identity.c
@@ -916,8 +916,8 @@ run (void *cls,
GNUNET_DISK_directory_scan (ego_directory,
&process_ego_file,
NULL);
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task,
- NULL);
+ GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
+ NULL);
}
diff --git a/src/identity/plugin_rest_identity.c b/src/identity/plugin_rest_identity.c
index 22ade6a0e5..5bed8af55a 100644
--- a/src/identity/plugin_rest_identity.c
+++ b/src/identity/plugin_rest_identity.c
@@ -257,9 +257,9 @@ cleanup_handle (struct RequestHandle *handle)
/**
- * Task run on shutdown. Cleans up everything.
+ * Task run on errors. Reports an error and cleans up everything.
*
- * @param cls unused
+ * @param cls the `struct RequestHandle`
*/
static void
do_error (void *cls)
@@ -273,7 +273,9 @@ do_error (void *cls)
&handle->emsg);
resp = GNUNET_REST_create_json_response (json_error);
- handle->proc (handle->proc_cls, resp, MHD_HTTP_BAD_REQUEST);
+ handle->proc (handle->proc_cls,
+ resp,
+ MHD_HTTP_BAD_REQUEST);
cleanup_handle (handle);
GNUNET_free (json_error);
}
diff --git a/src/identity/test_identity.c b/src/identity/test_identity.c
index 6eaa86e919..37065ce089 100644
--- a/src/identity/test_identity.c
+++ b/src/identity/test_identity.c
@@ -110,8 +110,7 @@ end ()
GNUNET_SCHEDULER_cancel (endbadly_task);
endbadly_task = NULL;
}
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MILLISECONDS,
- &end_normally, NULL);
+ GNUNET_SCHEDULER_add_now (&end_normally, NULL);
}