From: Schanzenbach, Martin Date: Thu, 25 Apr 2019 16:27:23 +0000 (+0200) Subject: IDENTITY/REST: gracefully return if no identities found X-Git-Tag: v0.11.4~92^2~5 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ed649403902b055935308ee7a244e2d3ba081301;p=oweals%2Fgnunet.git IDENTITY/REST: gracefully return if no identities found --- diff --git a/src/identity/plugin_rest_identity.c b/src/identity/plugin_rest_identity.c index 3bfca3121..89f590d3e 100644 --- a/src/identity/plugin_rest_identity.c +++ b/src/identity/plugin_rest_identity.c @@ -490,15 +490,6 @@ ego_get_all (struct GNUNET_REST_RequestHandle *con_handle, json_decref (json_ego); } - if ((size_t) 0 == json_array_size (json_root)) - { - json_decref (json_root); - handle->response_code = MHD_HTTP_NOT_FOUND; - handle->emsg = GNUNET_strdup(GNUNET_REST_IDENTITY_NOT_FOUND); - GNUNET_SCHEDULER_add_now (&do_error, handle); - return; - } - result_str = json_dumps (json_root, 0); GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Result %s\n", result_str); resp = GNUNET_REST_create_response (result_str);