aboutsummaryrefslogtreecommitdiff
path: root/src/identity/plugin_rest_identity.c
diff options
context:
space:
mode:
authorSchanzenbach, Martin <mschanzenbach@posteo.de>2019-04-25 18:27:23 +0200
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2019-04-25 18:27:23 +0200
commited649403902b055935308ee7a244e2d3ba081301 (patch)
tree4109fbe939cadcfc91fcb7a988aacbebc8bb0d1c /src/identity/plugin_rest_identity.c
parent60d3fd3e08cc2b47aeaa9dc4a1305ccd455c26cd (diff)
downloadgnunet-ed649403902b055935308ee7a244e2d3ba081301.tar.gz
gnunet-ed649403902b055935308ee7a244e2d3ba081301.zip
IDENTITY/REST: gracefully return if no identities found
Diffstat (limited to 'src/identity/plugin_rest_identity.c')
-rw-r--r--src/identity/plugin_rest_identity.c9
1 files changed, 0 insertions, 9 deletions
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,
490 json_decref (json_ego); 490 json_decref (json_ego);
491 } 491 }
492 492
493 if ((size_t) 0 == json_array_size (json_root))
494 {
495 json_decref (json_root);
496 handle->response_code = MHD_HTTP_NOT_FOUND;
497 handle->emsg = GNUNET_strdup(GNUNET_REST_IDENTITY_NOT_FOUND);
498 GNUNET_SCHEDULER_add_now (&do_error, handle);
499 return;
500 }
501
502 result_str = json_dumps (json_root, 0); 493 result_str = json_dumps (json_root, 0);
503 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Result %s\n", result_str); 494 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Result %s\n", result_str);
504 resp = GNUNET_REST_create_response (result_str); 495 resp = GNUNET_REST_create_response (result_str);