diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-04-30 08:17:37 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-04-30 08:17:37 +0000 |
commit | 95f9076a2139f5fb042b944a0658b6cda2fa35db (patch) | |
tree | b0826a2a1dcf812e6b4450fe6b05d47cd53ae49d /src/identity | |
parent | 7746f68db77b9ca3c4aaca24ab2ce5253461240b (diff) | |
download | gnunet-95f9076a2139f5fb042b944a0658b6cda2fa35db.tar.gz gnunet-95f9076a2139f5fb042b944a0658b6cda2fa35db.zip |
implementing new scheduler shutdown semantics
Diffstat (limited to 'src/identity')
-rw-r--r-- | src/identity/gnunet-identity.c | 3 | ||||
-rw-r--r-- | src/identity/gnunet-service-identity.c | 4 | ||||
-rw-r--r-- | src/identity/plugin_rest_identity.c | 8 | ||||
-rw-r--r-- | src/identity/test_identity.c | 3 |
4 files changed, 9 insertions, 9 deletions
diff --git a/src/identity/gnunet-identity.c b/src/identity/gnunet-identity.c index dc9174d21..23c20d91f 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, | |||
302 | create_ego, | 302 | create_ego, |
303 | &create_finished, | 303 | &create_finished, |
304 | &create_op); | 304 | &create_op); |
305 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, | 305 | GNUNET_SCHEDULER_add_shutdown (&shutdown_task, NULL); |
306 | &shutdown_task, NULL); | ||
307 | test_finished (); | 306 | test_finished (); |
308 | } | 307 | } |
309 | 308 | ||
diff --git a/src/identity/gnunet-service-identity.c b/src/identity/gnunet-service-identity.c index d36319a99..9185aac64 100644 --- a/src/identity/gnunet-service-identity.c +++ b/src/identity/gnunet-service-identity.c | |||
@@ -916,8 +916,8 @@ run (void *cls, | |||
916 | GNUNET_DISK_directory_scan (ego_directory, | 916 | GNUNET_DISK_directory_scan (ego_directory, |
917 | &process_ego_file, | 917 | &process_ego_file, |
918 | NULL); | 918 | NULL); |
919 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task, | 919 | GNUNET_SCHEDULER_add_shutdown (&shutdown_task, |
920 | NULL); | 920 | NULL); |
921 | } | 921 | } |
922 | 922 | ||
923 | 923 | ||
diff --git a/src/identity/plugin_rest_identity.c b/src/identity/plugin_rest_identity.c index 22ade6a0e..5bed8af55 100644 --- a/src/identity/plugin_rest_identity.c +++ b/src/identity/plugin_rest_identity.c | |||
@@ -257,9 +257,9 @@ cleanup_handle (struct RequestHandle *handle) | |||
257 | 257 | ||
258 | 258 | ||
259 | /** | 259 | /** |
260 | * Task run on shutdown. Cleans up everything. | 260 | * Task run on errors. Reports an error and cleans up everything. |
261 | * | 261 | * |
262 | * @param cls unused | 262 | * @param cls the `struct RequestHandle` |
263 | */ | 263 | */ |
264 | static void | 264 | static void |
265 | do_error (void *cls) | 265 | do_error (void *cls) |
@@ -273,7 +273,9 @@ do_error (void *cls) | |||
273 | &handle->emsg); | 273 | &handle->emsg); |
274 | 274 | ||
275 | resp = GNUNET_REST_create_json_response (json_error); | 275 | resp = GNUNET_REST_create_json_response (json_error); |
276 | handle->proc (handle->proc_cls, resp, MHD_HTTP_BAD_REQUEST); | 276 | handle->proc (handle->proc_cls, |
277 | resp, | ||
278 | MHD_HTTP_BAD_REQUEST); | ||
277 | cleanup_handle (handle); | 279 | cleanup_handle (handle); |
278 | GNUNET_free (json_error); | 280 | GNUNET_free (json_error); |
279 | } | 281 | } |
diff --git a/src/identity/test_identity.c b/src/identity/test_identity.c index 6eaa86e91..37065ce08 100644 --- a/src/identity/test_identity.c +++ b/src/identity/test_identity.c | |||
@@ -110,8 +110,7 @@ end () | |||
110 | GNUNET_SCHEDULER_cancel (endbadly_task); | 110 | GNUNET_SCHEDULER_cancel (endbadly_task); |
111 | endbadly_task = NULL; | 111 | endbadly_task = NULL; |
112 | } | 112 | } |
113 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MILLISECONDS, | 113 | GNUNET_SCHEDULER_add_now (&end_normally, NULL); |
114 | &end_normally, NULL); | ||
115 | } | 114 | } |
116 | 115 | ||
117 | 116 | ||