mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-29 04:09:31 +03:00
Replaced MHD_RESPMEM_PERSISTENT usage in examples and code
New functions do not produce compiler warnings.
This commit is contained in:
@@ -52,8 +52,7 @@ ahc_echo (void *cls,
|
||||
(void) cls; (void) url; (void) method; (void) version; /* Unused. Silent compiler warning. */
|
||||
(void) upload_data; (void) upload_data_size; (void) req_cls; /* Unused. Silent compiler warning. */
|
||||
|
||||
response = MHD_create_response_from_buffer (0, NULL,
|
||||
MHD_RESPMEM_PERSISTENT);
|
||||
response = MHD_create_response_empty (MHD_RF_NONE);
|
||||
ret = MHD_queue_response (connection, MHD_HTTP_OK, response);
|
||||
MHD_destroy_response (response);
|
||||
return ret;
|
||||
|
||||
@@ -120,9 +120,7 @@ ahc_empty (void *cls,
|
||||
return MHD_YES;
|
||||
}
|
||||
*req_cls = NULL;
|
||||
response = MHD_create_response_from_buffer (0,
|
||||
NULL,
|
||||
MHD_RESPMEM_PERSISTENT);
|
||||
response = MHD_create_response_empty (MHD_RF_NONE);
|
||||
ret = MHD_queue_response (connection,
|
||||
MHD_HTTP_OK,
|
||||
response);
|
||||
|
||||
@@ -84,9 +84,8 @@ query_session_ahc (void *cls, struct MHD_Connection *connection,
|
||||
}
|
||||
}
|
||||
|
||||
response = MHD_create_response_from_buffer (strlen (EMPTY_PAGE),
|
||||
(void *) EMPTY_PAGE,
|
||||
MHD_RESPMEM_PERSISTENT);
|
||||
response = MHD_create_response_from_buffer_static (strlen (EMPTY_PAGE),
|
||||
EMPTY_PAGE);
|
||||
ret = MHD_queue_response (connection, MHD_HTTP_OK, response);
|
||||
MHD_destroy_response (response);
|
||||
return ret;
|
||||
|
||||
@@ -224,9 +224,8 @@ http_ahc (void *cls,
|
||||
return MHD_YES;
|
||||
}
|
||||
*req_cls = NULL; /* reset when done */
|
||||
response = MHD_create_response_from_buffer (strlen (test_data),
|
||||
(void *) test_data,
|
||||
MHD_RESPMEM_PERSISTENT);
|
||||
response = MHD_create_response_from_buffer_static (strlen (test_data),
|
||||
test_data);
|
||||
ret = MHD_queue_response (connection, MHD_HTTP_OK, response);
|
||||
MHD_destroy_response (response);
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user