summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-06-12 07:52:45 +0000
committerChristian Grothoff <christian@grothoff.org>2015-06-12 07:52:45 +0000
commitfa7754fd510260ffb8850feb5d6559e55f75d4e9 (patch)
tree6da39156aedb0adcbfd3c289ea716b0939efa19c /src
parentd67d6d47727a91ed1767317f15f071abebfbdff7 (diff)
fix use of deprecated MHD symbols
Diffstat (limited to 'src')
-rw-r--r--src/hostlist/gnunet-daemon-hostlist_server.c5
-rw-r--r--src/namestore/gnunet-namestore-fcfsd.c2
-rw-r--r--src/transport/plugin_transport_http_server.c17
3 files changed, 13 insertions, 11 deletions
diff --git a/src/hostlist/gnunet-daemon-hostlist_server.c b/src/hostlist/gnunet-daemon-hostlist_server.c
index c73f32b01..084d2b5cd 100644
--- a/src/hostlist/gnunet-daemon-hostlist_server.c
+++ b/src/hostlist/gnunet-daemon-hostlist_server.c
@@ -170,8 +170,9 @@ finish_response ()
"Creating hostlist response with %u bytes\n",
(unsigned int) builder->size);
response =
- MHD_create_response_from_data (builder->size, builder->data, MHD_YES,
- MHD_NO);
+ MHD_create_response_from_buffer (builder->size,
+ builder->data,
+ MHD_RESPMEM_MUST_FREE);
add_cors_headers (response);
if ((NULL == daemon_handle_v4) && (NULL == daemon_handle_v6))
{
diff --git a/src/namestore/gnunet-namestore-fcfsd.c b/src/namestore/gnunet-namestore-fcfsd.c
index 6abe10d42..f23162af2 100644
--- a/src/namestore/gnunet-namestore-fcfsd.c
+++ b/src/namestore/gnunet-namestore-fcfsd.c
@@ -756,7 +756,7 @@ create_response (void *cls,
(void *) METHOD_ERROR,
MHD_RESPMEM_PERSISTENT);
ret = MHD_queue_response (connection,
- MHD_HTTP_METHOD_NOT_ACCEPTABLE,
+ MHD_HTTP_NOT_ACCEPTABLE,
response);
MHD_destroy_response (response);
return ret;
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c
index 9f2908bda..3ba651cb7 100644
--- a/src/transport/plugin_transport_http_server.c
+++ b/src/transport/plugin_transport_http_server.c
@@ -1761,10 +1761,9 @@ server_access_cb (void *cls,
else
{
/* existing session already has matching connection, refuse */
- response = MHD_create_response_from_data (strlen (HTTP_ERROR_RESPONSE),
- HTTP_ERROR_RESPONSE,
- MHD_NO,
- MHD_NO);
+ response = MHD_create_response_from_buffer (strlen (HTTP_ERROR_RESPONSE),
+ HTTP_ERROR_RESPONSE,
+ MHD_RESPMEM_PERSISTENT);
MHD_add_response_header (response,
MHD_HTTP_HEADER_CONTENT_TYPE,
"text/html");
@@ -1779,8 +1778,9 @@ server_access_cb (void *cls,
{
/* Session was already disconnected;
sent HTTP/1.1: 200 OK as response */
- response = MHD_create_response_from_data (strlen ("Thank you!"),
- "Thank you!", MHD_NO, MHD_NO);
+ response = MHD_create_response_from_buffer (strlen ("Thank you!"),
+ "Thank you!",
+ MHD_RESPMEM_PERSISTENT);
add_cors_headers(response);
MHD_queue_response (mhd_connection, MHD_HTTP_OK, response);
MHD_destroy_response (response);
@@ -1823,8 +1823,9 @@ server_access_cb (void *cls,
s->address->address_length));
sc->connected = GNUNET_NO;
/* Sent HTTP/1.1: 200 OK as PUT Response\ */
- response = MHD_create_response_from_data (strlen ("Thank you!"),
- "Thank you!", MHD_NO, MHD_NO);
+ response = MHD_create_response_from_buffer (strlen ("Thank you!"),
+ "Thank you!",
+ MHD_RESPMEM_PERSISTENT);
add_cors_headers(response);
MHD_queue_response (mhd_connection, MHD_HTTP_OK, response);
MHD_destroy_response (response);