aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2016-05-05 09:13:47 +0000
committerMartin Schanzenbach <mschanzenbach@posteo.de>2016-05-05 09:13:47 +0000
commite2e045f3fef2231c435ae7dacbb5e947a0193a20 (patch)
treeb7e82a64747f01328ec7bbc621ac0bef9af1a839 /src
parentebcc6d29c91f2091950e53820f98c2a95bca3a7a (diff)
downloadgnunet-e2e045f3fef2231c435ae7dacbb5e947a0193a20.tar.gz
gnunet-e2e045f3fef2231c435ae7dacbb5e947a0193a20.zip
- remove HAVE_REST, remove json reference from rest
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am6
-rw-r--r--src/gns/Makefile.am4
-rw-r--r--src/identity/Makefile.am4
-rw-r--r--src/namestore/Makefile.am4
-rw-r--r--src/rest/Makefile.am2
-rw-r--r--src/rest/rest.c7
6 files changed, 17 insertions, 10 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 946711797..5582c178b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -19,9 +19,11 @@ if HAVE_EXPERIMENTAL
19 19
20endif 20endif
21 21
22if HAVE_REST 22if HAVE_JSON
23if HAVE_MHD
23 PROVIDER_DIR = identity-provider 24 PROVIDER_DIR = identity-provider
24endif 25endif
26endif
25 27
26if HAVE_JSON 28if HAVE_JSON
27 JSON_DIR = json 29 JSON_DIR = json
@@ -50,7 +52,7 @@ if HAVE_POSTGRESQL
50 POSTGRES_DIR = pq postgres 52 POSTGRES_DIR = pq postgres
51endif 53endif
52 54
53if HAVE_REST 55if HAVE_MHD
54 REST_DIR = rest 56 REST_DIR = rest
55if HAVE_JSON 57if HAVE_JSON
56 JSONAPI_DIR = jsonapi 58 JSONAPI_DIR = jsonapi
diff --git a/src/gns/Makefile.am b/src/gns/Makefile.am
index 5ac598735..04fe45224 100644
--- a/src/gns/Makefile.am
+++ b/src/gns/Makefile.am
@@ -92,9 +92,11 @@ plugin_LTLIBRARIES = \
92 libgnunet_plugin_gnsrecord_gns.la 92 libgnunet_plugin_gnsrecord_gns.la
93 93
94 94
95if HAVE_REST 95if HAVE_MHD
96if HAVE_JSON
96plugin_LTLIBRARIES += libgnunet_plugin_rest_gns.la 97plugin_LTLIBRARIES += libgnunet_plugin_rest_gns.la
97endif 98endif
99endif
98 100
99libgnunet_plugin_gnsrecord_gns_la_SOURCES = \ 101libgnunet_plugin_gnsrecord_gns_la_SOURCES = \
100 plugin_gnsrecord_gns.c 102 plugin_gnsrecord_gns.c
diff --git a/src/identity/Makefile.am b/src/identity/Makefile.am
index f902f74fd..9b28ac093 100644
--- a/src/identity/Makefile.am
+++ b/src/identity/Makefile.am
@@ -39,11 +39,13 @@ bin_PROGRAMS = \
39libexec_PROGRAMS = \ 39libexec_PROGRAMS = \
40 gnunet-service-identity 40 gnunet-service-identity
41 41
42if HAVE_REST 42if HAVE_MHD
43if HAVE_JSON
43plugin_LTLIBRARIES = \ 44plugin_LTLIBRARIES = \
44 libgnunet_plugin_rest_identity.la \ 45 libgnunet_plugin_rest_identity.la \
45 libgnunet_plugin_gnsrecord_identity.la 46 libgnunet_plugin_gnsrecord_identity.la
46endif 47endif
48endif
47 49
48 50
49gnunet_service_identity_SOURCES = \ 51gnunet_service_identity_SOURCES = \
diff --git a/src/namestore/Makefile.am b/src/namestore/Makefile.am
index cf47e8507..5fddebfa8 100644
--- a/src/namestore/Makefile.am
+++ b/src/namestore/Makefile.am
@@ -71,9 +71,11 @@ check_PROGRAMS = \
71 $(TESTING_TESTS) 71 $(TESTING_TESTS)
72endif 72endif
73 73
74if HAVE_REST 74if HAVE_MHD
75if HAVE_JSON
75REST_PLUGIN=libgnunet_plugin_rest_namestore.la 76REST_PLUGIN=libgnunet_plugin_rest_namestore.la
76endif 77endif
78endif
77 79
78if ENABLE_TEST_RUN 80if ENABLE_TEST_RUN
79AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH; 81AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
diff --git a/src/rest/Makefile.am b/src/rest/Makefile.am
index 9ab7c03e0..c0feb9122 100644
--- a/src/rest/Makefile.am
+++ b/src/rest/Makefile.am
@@ -38,7 +38,7 @@ libgnunetrest_la_SOURCES = \
38 rest.c 38 rest.c
39libgnunetrest_la_LIBADD = \ 39libgnunetrest_la_LIBADD = \
40 $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \ 40 $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \
41 $(GN_LIBINTL) -lmicrohttpd -ljansson 41 $(GN_LIBINTL) -lmicrohttpd
42libgnunetrest_la_LDFLAGS = \ 42libgnunetrest_la_LDFLAGS = \
43 $(GN_LIB_LDFLAGS) \ 43 $(GN_LIB_LDFLAGS) \
44 -version-info 0:0:0 44 -version-info 0:0:0
diff --git a/src/rest/rest.c b/src/rest/rest.c
index bf32c9849..b0d7e5ace 100644
--- a/src/rest/rest.c
+++ b/src/rest/rest.c
@@ -48,13 +48,13 @@ GNUNET_REST_namespace_match (const char *url, const char *namespace)
48} 48}
49 49
50/** 50/**
51 * Create JSON API MHD response 51 * Create MHD response
52 * 52 *
53 * @param data JSON result 53 * @param data result
54 * @retun MHD response 54 * @retun MHD response
55 */ 55 */
56struct MHD_Response* 56struct MHD_Response*
57GNUNET_REST_create_json_response (const char *data) 57GNUNET_REST_create_response (const char *data)
58{ 58{
59 struct MHD_Response *resp; 59 struct MHD_Response *resp;
60 size_t len; 60 size_t len;
@@ -69,7 +69,6 @@ GNUNET_REST_create_json_response (const char *data)
69 resp = MHD_create_response_from_buffer (len, 69 resp = MHD_create_response_from_buffer (len,
70 (void*)data, 70 (void*)data,
71 MHD_RESPMEM_MUST_COPY); 71 MHD_RESPMEM_MUST_COPY);
72 MHD_add_response_header (resp,MHD_HTTP_HEADER_CONTENT_TYPE,"application/json");
73 return resp; 72 return resp;
74 73
75} 74}