fix compiler warning for format string
[oweals/gnunet.git] / src / gns / plugin_rest_gns.c
index b2034c8cee9900cb8224f806baa1ab854e4f930a..3cddbc2469a2754ab04266bca1201611669fbe5c 100644 (file)
@@ -33,6 +33,7 @@
 #include <gnunet_gns_service.h>
 #include <gnunet_rest_lib.h>
 #include <gnunet_jsonapi_lib.h>
+#include <gnunet_jsonapi_util.h>
 #include <jansson.h>
 
 #define GNUNET_REST_API_NS_GNS "/gns"
@@ -227,7 +228,7 @@ do_error (void *cls)
   struct LookupHandle *handle = cls;
   struct MHD_Response *resp;
 
-  resp = GNUNET_REST_create_json_response (NULL);
+  resp = GNUNET_REST_create_response (NULL);
   handle->proc (handle->proc_cls, resp, handle->response_code);
   cleanup_handle (handle);
 }
@@ -323,7 +324,7 @@ process_lookup_result (void *cls, uint32_t rd_count,
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Result %s\n", result);
   json_decref (result_array);
   GNUNET_JSONAPI_document_delete (json_document);
-  resp = GNUNET_REST_create_json_response (result);
+  resp = GNUNET_REST_create_response (result);
   handle->proc (handle->proc_cls, resp, MHD_HTTP_OK);
   GNUNET_free (result);
   cleanup_handle (handle);
@@ -639,7 +640,7 @@ options_cont (struct GNUNET_REST_RequestHandle *con_handle,
   struct LookupHandle *handle = cls;
 
   //For GNS, independent of path return all options
-  resp = GNUNET_REST_create_json_response (NULL);
+  resp = GNUNET_REST_create_response (NULL);
   MHD_add_response_header (resp,
                            "Access-Control-Allow-Methods",
                            MHD_HTTP_METHOD_GET);