aboutsummaryrefslogtreecommitdiff
path: root/src/gns/plugin_rest_gns.c
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 /src/gns/plugin_rest_gns.c
parentd3ba7a63bb47299d70fe7895e5df9a523607492e (diff)
downloadgnunet-5dfc382a9f8467cd15b6a0c3a6e022fca9fc4a30.tar.gz
gnunet-5dfc382a9f8467cd15b6a0c3a6e022fca9fc4a30.zip
- fix rest plugin
Diffstat (limited to 'src/gns/plugin_rest_gns.c')
-rw-r--r--src/gns/plugin_rest_gns.c6
1 files changed, 3 insertions, 3 deletions
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);