summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2016-06-18 18:16:22 +0000
committerMartin Schanzenbach <mschanzenbach@posteo.de>2016-06-18 18:16:22 +0000
commit5dfc382a9f8467cd15b6a0c3a6e022fca9fc4a30 (patch)
tree5d285afb370bb3d5800c3541a20760ab3db845d6
parentd3ba7a63bb47299d70fe7895e5df9a523607492e (diff)
downloadgnunet-5dfc382a9f8467cd15b6a0c3a6e022fca9fc4a30.tar.gz
gnunet-5dfc382a9f8467cd15b6a0c3a6e022fca9fc4a30.zip
- fix rest plugin
-rw-r--r--src/gns/Makefile.am1
-rw-r--r--src/gns/plugin_rest_gns.c6
-rw-r--r--src/identity/Makefile.am1
-rw-r--r--src/identity/plugin_rest_identity.c22
-rw-r--r--src/include/gnunet_rest_lib.h6
-rw-r--r--src/namestore/Makefile.am1
-rw-r--r--src/namestore/plugin_rest_namestore.c26
7 files changed, 33 insertions, 30 deletions
diff --git a/src/gns/Makefile.am b/src/gns/Makefile.am
index 04fe45224..33fd96d9d 100644
--- a/src/gns/Makefile.am
+++ b/src/gns/Makefile.am
@@ -237,6 +237,7 @@ libgnunet_plugin_rest_gns_la_LIBADD = \
237 $(top_builddir)/src/rest/libgnunetrest.la \ 237 $(top_builddir)/src/rest/libgnunetrest.la \
238 $(top_builddir)/src/identity/libgnunetidentity.la \ 238 $(top_builddir)/src/identity/libgnunetidentity.la \
239 $(top_builddir)/src/jsonapi/libgnunetjsonapi.la \ 239 $(top_builddir)/src/jsonapi/libgnunetjsonapi.la \
240 $(top_builddir)/src/jsonapi/libgnunetjsonapiutils.la \
240 $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ 241 $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
241 $(LTLIBINTL) -ljansson -lmicrohttpd 242 $(LTLIBINTL) -ljansson -lmicrohttpd
242libgnunet_plugin_rest_gns_la_LDFLAGS = \ 243libgnunet_plugin_rest_gns_la_LDFLAGS = \
diff --git a/src/gns/plugin_rest_gns.c b/src/gns/plugin_rest_gns.c
index ef49b82a9..3cddbc246 100644
--- a/src/gns/plugin_rest_gns.c
+++ b/src/gns/plugin_rest_gns.c
@@ -228,7 +228,7 @@ do_error (void *cls)
228 struct LookupHandle *handle = cls; 228 struct LookupHandle *handle = cls;
229 struct MHD_Response *resp; 229 struct MHD_Response *resp;
230 230
231 resp = GNUNET_REST_create_json_response (NULL); 231 resp = GNUNET_REST_create_response (NULL);
232 handle->proc (handle->proc_cls, resp, handle->response_code); 232 handle->proc (handle->proc_cls, resp, handle->response_code);
233 cleanup_handle (handle); 233 cleanup_handle (handle);
234} 234}
@@ -324,7 +324,7 @@ process_lookup_result (void *cls, uint32_t rd_count,
324 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Result %s\n", result); 324 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Result %s\n", result);
325 json_decref (result_array); 325 json_decref (result_array);
326 GNUNET_JSONAPI_document_delete (json_document); 326 GNUNET_JSONAPI_document_delete (json_document);
327 resp = GNUNET_REST_create_json_response (result); 327 resp = GNUNET_REST_create_response (result);
328 handle->proc (handle->proc_cls, resp, MHD_HTTP_OK); 328 handle->proc (handle->proc_cls, resp, MHD_HTTP_OK);
329 GNUNET_free (result); 329 GNUNET_free (result);
330 cleanup_handle (handle); 330 cleanup_handle (handle);
@@ -640,7 +640,7 @@ options_cont (struct GNUNET_REST_RequestHandle *con_handle,
640 struct LookupHandle *handle = cls; 640 struct LookupHandle *handle = cls;
641 641
642 //For GNS, independent of path return all options 642 //For GNS, independent of path return all options
643 resp = GNUNET_REST_create_json_response (NULL); 643 resp = GNUNET_REST_create_response (NULL);
644 MHD_add_response_header (resp, 644 MHD_add_response_header (resp,
645 "Access-Control-Allow-Methods", 645 "Access-Control-Allow-Methods",
646 MHD_HTTP_METHOD_GET); 646 MHD_HTTP_METHOD_GET);
diff --git a/src/identity/Makefile.am b/src/identity/Makefile.am
index 9b28ac093..c6f6625f4 100644
--- a/src/identity/Makefile.am
+++ b/src/identity/Makefile.am
@@ -70,6 +70,7 @@ libgnunet_plugin_rest_identity_la_LIBADD = \
70 libgnunetidentity.la \ 70 libgnunetidentity.la \
71 $(top_builddir)/src/rest/libgnunetrest.la \ 71 $(top_builddir)/src/rest/libgnunetrest.la \
72 $(top_builddir)/src/jsonapi/libgnunetjsonapi.la \ 72 $(top_builddir)/src/jsonapi/libgnunetjsonapi.la \
73 $(top_builddir)/src/jsonapi/libgnunetjsonapiutils.la \
73 $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ 74 $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
74 $(LTLIBINTL) -ljansson -lmicrohttpd 75 $(LTLIBINTL) -ljansson -lmicrohttpd
75libgnunet_plugin_rest_identity_la_LDFLAGS = \ 76libgnunet_plugin_rest_identity_la_LDFLAGS = \
diff --git a/src/identity/plugin_rest_identity.c b/src/identity/plugin_rest_identity.c
index f14c80f42..44e754e6c 100644
--- a/src/identity/plugin_rest_identity.c
+++ b/src/identity/plugin_rest_identity.c
@@ -279,7 +279,7 @@ do_error (void *cls)
279 "{Error while processing request: %s}", 279 "{Error while processing request: %s}",
280 &handle->emsg); 280 &handle->emsg);
281 281
282 resp = GNUNET_REST_create_json_response (json_error); 282 resp = GNUNET_REST_create_response (json_error);
283 handle->proc (handle->proc_cls, 283 handle->proc (handle->proc_cls,
284 resp, 284 resp,
285 handle->response_code); 285 handle->response_code);
@@ -339,7 +339,7 @@ get_ego_for_subsys (void *cls,
339 } 339 }
340 GNUNET_JSONAPI_document_serialize (json_document, &result_str); 340 GNUNET_JSONAPI_document_serialize (json_document, &result_str);
341 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Result %s\n", result_str); 341 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Result %s\n", result_str);
342 resp = GNUNET_REST_create_json_response (result_str); 342 resp = GNUNET_REST_create_response (result_str);
343 GNUNET_JSONAPI_document_delete (json_document); 343 GNUNET_JSONAPI_document_delete (json_document);
344 handle->proc (handle->proc_cls, resp, MHD_HTTP_OK); 344 handle->proc (handle->proc_cls, resp, MHD_HTTP_OK);
345 GNUNET_free (result_str); 345 GNUNET_free (result_str);
@@ -372,7 +372,7 @@ ego_info_response (struct GNUNET_REST_RequestHandle *con,
372 372
373 if (GNUNET_NO == GNUNET_REST_namespace_match (handle->url, GNUNET_REST_API_NS_IDENTITY)) 373 if (GNUNET_NO == GNUNET_REST_namespace_match (handle->url, GNUNET_REST_API_NS_IDENTITY))
374 { 374 {
375 resp = GNUNET_REST_create_json_response (NULL); 375 resp = GNUNET_REST_create_response (NULL);
376 handle->proc (handle->proc_cls, resp, MHD_HTTP_BAD_REQUEST); 376 handle->proc (handle->proc_cls, resp, MHD_HTTP_BAD_REQUEST);
377 cleanup_handle (handle); 377 cleanup_handle (handle);
378 return; 378 return;
@@ -444,7 +444,7 @@ ego_info_response (struct GNUNET_REST_RequestHandle *con,
444 } 444 }
445 GNUNET_JSONAPI_document_serialize (json_document, &result_str); 445 GNUNET_JSONAPI_document_serialize (json_document, &result_str);
446 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Result %s\n", result_str); 446 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Result %s\n", result_str);
447 resp = GNUNET_REST_create_json_response (result_str); 447 resp = GNUNET_REST_create_response (result_str);
448 GNUNET_JSONAPI_document_delete (json_document); 448 GNUNET_JSONAPI_document_delete (json_document);
449 handle->proc (handle->proc_cls, resp, MHD_HTTP_OK); 449 handle->proc (handle->proc_cls, resp, MHD_HTTP_OK);
450 GNUNET_free (result_str); 450 GNUNET_free (result_str);
@@ -470,7 +470,7 @@ do_finished (void *cls, const char *emsg)
470 GNUNET_SCHEDULER_add_now (&do_error, handle); 470 GNUNET_SCHEDULER_add_now (&do_error, handle);
471 return; 471 return;
472 } 472 }
473 resp = GNUNET_REST_create_json_response (NULL); 473 resp = GNUNET_REST_create_response (NULL);
474 handle->proc (handle->proc_cls, resp, MHD_HTTP_NO_CONTENT); 474 handle->proc (handle->proc_cls, resp, MHD_HTTP_NO_CONTENT);
475 cleanup_handle (handle); 475 cleanup_handle (handle);
476} 476}
@@ -528,7 +528,7 @@ ego_create_cont (struct GNUNET_REST_RequestHandle *con,
528 if (GNUNET_NO == GNUNET_JSONAPI_resource_check_type (json_res, GNUNET_REST_JSONAPI_IDENTITY_EGO)) 528 if (GNUNET_NO == GNUNET_JSONAPI_resource_check_type (json_res, GNUNET_REST_JSONAPI_IDENTITY_EGO))
529 { 529 {
530 GNUNET_JSONAPI_document_delete (json_obj); 530 GNUNET_JSONAPI_document_delete (json_obj);
531 resp = GNUNET_REST_create_json_response (NULL); 531 resp = GNUNET_REST_create_response (NULL);
532 handle->proc (handle->proc_cls, resp, MHD_HTTP_CONFLICT); 532 handle->proc (handle->proc_cls, resp, MHD_HTTP_CONFLICT);
533 cleanup_handle (handle); 533 cleanup_handle (handle);
534 return; 534 return;
@@ -549,7 +549,7 @@ ego_create_cont (struct GNUNET_REST_RequestHandle *con,
549 if (0 == strcasecmp (egoname, ego_entry->identifier)) 549 if (0 == strcasecmp (egoname, ego_entry->identifier))
550 { 550 {
551 GNUNET_JSONAPI_document_delete (json_obj); 551 GNUNET_JSONAPI_document_delete (json_obj);
552 resp = GNUNET_REST_create_json_response (NULL); 552 resp = GNUNET_REST_create_response (NULL);
553 handle->proc (handle->proc_cls, resp, MHD_HTTP_CONFLICT); 553 handle->proc (handle->proc_cls, resp, MHD_HTTP_CONFLICT);
554 cleanup_handle (handle); 554 cleanup_handle (handle);
555 return; 555 return;
@@ -610,7 +610,7 @@ ego_edit_cont (struct GNUNET_REST_RequestHandle *con,
610 610
611 if (GNUNET_NO == ego_exists) 611 if (GNUNET_NO == ego_exists)
612 { 612 {
613 resp = GNUNET_REST_create_json_response (NULL); 613 resp = GNUNET_REST_create_response (NULL);
614 handle->proc (handle->proc_cls, resp, MHD_HTTP_NOT_FOUND); 614 handle->proc (handle->proc_cls, resp, MHD_HTTP_NOT_FOUND);
615 cleanup_handle (handle); 615 cleanup_handle (handle);
616 return; 616 return;
@@ -667,7 +667,7 @@ ego_edit_cont (struct GNUNET_REST_RequestHandle *con,
667 { 667 {
668 //Ego with same name not allowed 668 //Ego with same name not allowed
669 GNUNET_JSONAPI_document_delete (json_obj); 669 GNUNET_JSONAPI_document_delete (json_obj);
670 resp = GNUNET_REST_create_json_response (NULL); 670 resp = GNUNET_REST_create_response (NULL);
671 handle->proc (handle->proc_cls, resp, MHD_HTTP_CONFLICT); 671 handle->proc (handle->proc_cls, resp, MHD_HTTP_CONFLICT);
672 cleanup_handle (handle); 672 cleanup_handle (handle);
673 return; 673 return;
@@ -731,7 +731,7 @@ ego_delete_cont (struct GNUNET_REST_RequestHandle *con_handle,
731 } 731 }
732 if (GNUNET_NO == ego_exists) 732 if (GNUNET_NO == ego_exists)
733 { 733 {
734 resp = GNUNET_REST_create_json_response (NULL); 734 resp = GNUNET_REST_create_response (NULL);
735 handle->proc (handle->proc_cls, resp, MHD_HTTP_NOT_FOUND); 735 handle->proc (handle->proc_cls, resp, MHD_HTTP_NOT_FOUND);
736 cleanup_handle (handle); 736 cleanup_handle (handle);
737 return; 737 return;
@@ -760,7 +760,7 @@ options_cont (struct GNUNET_REST_RequestHandle *con_handle,
760 struct RequestHandle *handle = cls; 760 struct RequestHandle *handle = cls;
761 761
762 //For now, independent of path return all options 762 //For now, independent of path return all options
763 resp = GNUNET_REST_create_json_response (NULL); 763 resp = GNUNET_REST_create_response (NULL);
764 MHD_add_response_header (resp, 764 MHD_add_response_header (resp,
765 "Access-Control-Allow-Methods", 765 "Access-Control-Allow-Methods",
766 allow_methods); 766 allow_methods);
diff --git a/src/include/gnunet_rest_lib.h b/src/include/gnunet_rest_lib.h
index 0616a33d8..243c38403 100644
--- a/src/include/gnunet_rest_lib.h
+++ b/src/include/gnunet_rest_lib.h
@@ -95,13 +95,13 @@ int
95GNUNET_REST_namespace_match (const char *url, const char *namespace); 95GNUNET_REST_namespace_match (const char *url, const char *namespace);
96 96
97/** 97/**
98 * Create JSON API MHD response 98 * Create REST MHD response
99 * 99 *
100 * @param data JSON result 100 * @param data result
101 * @retun MHD response 101 * @retun MHD response
102 */ 102 */
103 struct MHD_Response* 103 struct MHD_Response*
104GNUNET_REST_create_json_response (const char *data); 104GNUNET_REST_create_response (const char *data);
105 105
106 106
107int 107int
diff --git a/src/namestore/Makefile.am b/src/namestore/Makefile.am
index 5fddebfa8..50b33a18a 100644
--- a/src/namestore/Makefile.am
+++ b/src/namestore/Makefile.am
@@ -195,6 +195,7 @@ libgnunet_plugin_rest_namestore_la_LIBADD = \
195 $(top_builddir)/src/rest/libgnunetrest.la \ 195 $(top_builddir)/src/rest/libgnunetrest.la \
196 $(top_builddir)/src/identity/libgnunetidentity.la \ 196 $(top_builddir)/src/identity/libgnunetidentity.la \
197 $(top_builddir)/src/jsonapi/libgnunetjsonapi.la \ 197 $(top_builddir)/src/jsonapi/libgnunetjsonapi.la \
198 $(top_builddir)/src/jsonapi/libgnunetjsonapiutils.la \
198 $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \ 199 $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
199 $(LTLIBINTL) -ljansson -lmicrohttpd 200 $(LTLIBINTL) -ljansson -lmicrohttpd
200libgnunet_plugin_rest_namestore_la_LDFLAGS = \ 201libgnunet_plugin_rest_namestore_la_LDFLAGS = \
diff --git a/src/namestore/plugin_rest_namestore.c b/src/namestore/plugin_rest_namestore.c
index 873a12b83..42959bed8 100644
--- a/src/namestore/plugin_rest_namestore.c
+++ b/src/namestore/plugin_rest_namestore.c
@@ -358,7 +358,7 @@ static void
358do_error (void *cls) 358do_error (void *cls)
359{ 359{
360 struct RequestHandle *handle = cls; 360 struct RequestHandle *handle = cls;
361 struct MHD_Response *resp = GNUNET_REST_create_json_response (NULL); 361 struct MHD_Response *resp = GNUNET_REST_create_response (NULL);
362 362
363 handle->proc (handle->proc_cls, resp, handle->response_code); 363 handle->proc (handle->proc_cls, resp, handle->response_code);
364 cleanup_handle (handle); 364 cleanup_handle (handle);
@@ -419,9 +419,9 @@ namestore_list_response (void *cls,
419 GNUNET_SCHEDULER_add_now (&do_error, handle); 419 GNUNET_SCHEDULER_add_now (&do_error, handle);
420 return; 420 return;
421 } 421 }
422 resp = GNUNET_REST_create_json_response (result); 422 resp = GNUNET_REST_create_response (result);
423 handle->proc (handle->proc_cls, resp, MHD_HTTP_OK); 423 handle->proc (handle->proc_cls, resp, MHD_HTTP_OK);
424 GNUNET_free (result); 424 GNUNET_free_non_null (result);
425 GNUNET_SCHEDULER_add_now (&cleanup_handle_delayed, handle); 425 GNUNET_SCHEDULER_add_now (&cleanup_handle_delayed, handle);
426 return; 426 return;
427 } 427 }
@@ -480,7 +480,7 @@ create_finished (void *cls, int32_t success, const char *emsg)
480 GNUNET_SCHEDULER_add_now (&cleanup_handle_delayed, handle); 480 GNUNET_SCHEDULER_add_now (&cleanup_handle_delayed, handle);
481 return; 481 return;
482 } 482 }
483 resp = GNUNET_REST_create_json_response (NULL); 483 resp = GNUNET_REST_create_response (NULL);
484 handle->proc (handle->proc_cls, resp, MHD_HTTP_NO_CONTENT); 484 handle->proc (handle->proc_cls, resp, MHD_HTTP_NO_CONTENT);
485 GNUNET_SCHEDULER_add_now (&cleanup_handle_delayed, handle); 485 GNUNET_SCHEDULER_add_now (&cleanup_handle_delayed, handle);
486} 486}
@@ -517,7 +517,7 @@ create_new_record_cont (void *cls,
517 if (0 != rd_count) 517 if (0 != rd_count)
518 { 518 {
519 handle->proc (handle->proc_cls, 519 handle->proc (handle->proc_cls,
520 GNUNET_REST_create_json_response (NULL), 520 GNUNET_REST_create_response (NULL),
521 MHD_HTTP_CONFLICT); 521 MHD_HTTP_CONFLICT);
522 GNUNET_SCHEDULER_add_now (&cleanup_handle_delayed, handle); 522 GNUNET_SCHEDULER_add_now (&cleanup_handle_delayed, handle);
523 return; 523 return;
@@ -560,7 +560,7 @@ del_finished (void *cls,
560 return; 560 return;
561 } 561 }
562 handle->proc (handle->proc_cls, 562 handle->proc (handle->proc_cls,
563 GNUNET_REST_create_json_response (NULL), 563 GNUNET_REST_create_response (NULL),
564 MHD_HTTP_NO_CONTENT); 564 MHD_HTTP_NO_CONTENT);
565 GNUNET_SCHEDULER_add_now (&cleanup_handle_delayed, handle); 565 GNUNET_SCHEDULER_add_now (&cleanup_handle_delayed, handle);
566} 566}
@@ -767,7 +767,7 @@ namestore_create_cont (struct GNUNET_REST_RequestHandle *con,
767 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 767 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
768 "Unsupported JSON data type\n"); 768 "Unsupported JSON data type\n");
769 GNUNET_JSONAPI_document_delete (json_obj); 769 GNUNET_JSONAPI_document_delete (json_obj);
770 resp = GNUNET_REST_create_json_response (NULL); 770 resp = GNUNET_REST_create_response (NULL);
771 handle->proc (handle->proc_cls, resp, MHD_HTTP_CONFLICT); 771 handle->proc (handle->proc_cls, resp, MHD_HTTP_CONFLICT);
772 cleanup_handle (handle); 772 cleanup_handle (handle);
773 return; 773 return;
@@ -831,7 +831,7 @@ namestore_zkey_response (void *cls,
831 GNUNET_SCHEDULER_add_now (&do_error, handle); 831 GNUNET_SCHEDULER_add_now (&do_error, handle);
832 return; 832 return;
833 } 833 }
834 resp = GNUNET_REST_create_json_response (result); 834 resp = GNUNET_REST_create_response (result);
835 handle->proc (handle->proc_cls, resp, MHD_HTTP_OK); 835 handle->proc (handle->proc_cls, resp, MHD_HTTP_OK);
836 GNUNET_JSONAPI_document_delete (json_obj); 836 GNUNET_JSONAPI_document_delete (json_obj);
837 GNUNET_free (result); 837 GNUNET_free (result);
@@ -916,7 +916,7 @@ options_cont (struct GNUNET_REST_RequestHandle *con_handle,
916 struct RequestHandle *handle = cls; 916 struct RequestHandle *handle = cls;
917 917
918 //For now, independent of path return all options 918 //For now, independent of path return all options
919 resp = GNUNET_REST_create_json_response (NULL); 919 resp = GNUNET_REST_create_response (NULL);
920 MHD_add_response_header (resp, 920 MHD_add_response_header (resp,
921 "Access-Control-Allow-Methods", 921 "Access-Control-Allow-Methods",
922 allow_methods); 922 allow_methods);
@@ -999,7 +999,7 @@ identity_cb (void *cls,
999 _("Ego `%s' not known to identity service\n"), 999 _("Ego `%s' not known to identity service\n"),
1000 handle->ego_name); 1000 handle->ego_name);
1001 } 1001 }
1002 resp = GNUNET_REST_create_json_response (NULL); 1002 resp = GNUNET_REST_create_response (NULL);
1003 handle->proc (handle->proc_cls, resp, MHD_HTTP_NOT_FOUND); 1003 handle->proc (handle->proc_cls, resp, MHD_HTTP_NOT_FOUND);
1004 cleanup_handle (handle); 1004 cleanup_handle (handle);
1005 return; 1005 return;
@@ -1024,7 +1024,7 @@ default_ego_cb (void *cls,
1024 { 1024 {
1025 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1025 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1026 _("No default ego configured in identity service\n")); 1026 _("No default ego configured in identity service\n"));
1027 resp = GNUNET_REST_create_json_response (NULL); 1027 resp = GNUNET_REST_create_response (NULL);
1028 handle->proc (handle->proc_cls, resp, MHD_HTTP_NOT_FOUND); 1028 handle->proc (handle->proc_cls, resp, MHD_HTTP_NOT_FOUND);
1029 cleanup_handle (handle); 1029 cleanup_handle (handle);
1030 return; 1030 return;
@@ -1064,7 +1064,7 @@ testservice_id_task (void *cls, int result)
1064 { 1064 {
1065 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1065 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1066 _("Identity service is not running\n")); 1066 _("Identity service is not running\n"));
1067 resp = GNUNET_REST_create_json_response (NULL); 1067 resp = GNUNET_REST_create_response (NULL);
1068 handle->proc (handle->proc_cls, resp, MHD_HTTP_NOT_FOUND); 1068 handle->proc (handle->proc_cls, resp, MHD_HTTP_NOT_FOUND);
1069 cleanup_handle (handle); 1069 cleanup_handle (handle);
1070 return; 1070 return;
@@ -1105,7 +1105,7 @@ testservice_id_task (void *cls, int result)
1105 if (NULL == handle->identity_handle) 1105 if (NULL == handle->identity_handle)
1106 { 1106 {
1107 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Cannot connect to identity service\n")); 1107 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Cannot connect to identity service\n"));
1108 resp = GNUNET_REST_create_json_response (NULL); 1108 resp = GNUNET_REST_create_response (NULL);
1109 handle->proc (handle->proc_cls, resp, MHD_HTTP_NOT_FOUND); 1109 handle->proc (handle->proc_cls, resp, MHD_HTTP_NOT_FOUND);
1110 cleanup_handle (handle); 1110 cleanup_handle (handle);
1111 } 1111 }