summaryrefslogtreecommitdiff
path: root/src/mhd
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-04-09 00:59:55 +0200
committerChristian Grothoff <christian@grothoff.org>2020-04-09 00:59:55 +0200
commit543fe4ae36649cf64eabb1b1447539bfb0c3c7c2 (patch)
tree81e9bf344e28225ccf425311519738c7fe3b0300 /src/mhd
parent84a40be0bce66cda800de7891f758a0c69afc7fa (diff)
downloadexchange-543fe4ae36649cf64eabb1b1447539bfb0c3c7c2.tar.gz
exchange-543fe4ae36649cf64eabb1b1447539bfb0c3c7c2.tar.bz2
exchange-543fe4ae36649cf64eabb1b1447539bfb0c3c7c2.zip
make code compiler without warnings with latest libmicrohttpd API
Diffstat (limited to 'src/mhd')
-rw-r--r--src/mhd/mhd_config.c2
-rw-r--r--src/mhd/mhd_legal.c6
-rw-r--r--src/mhd/mhd_responses.c34
3 files changed, 21 insertions, 21 deletions
diff --git a/src/mhd/mhd_config.c b/src/mhd/mhd_config.c
index d8ae1da75..e2471e9b5 100644
--- a/src/mhd/mhd_config.c
+++ b/src/mhd/mhd_config.c
@@ -42,7 +42,7 @@
* @param[out] unix_mode set to the mode to be used for @a unix_path
* @return #GNUNET_OK on success
*/
-int
+enum GNUNET_GenericReturnValue
TALER_MHD_parse_config (const struct GNUNET_CONFIGURATION_Handle *cfg,
const char *section,
uint16_t *rport,
diff --git a/src/mhd/mhd_legal.c b/src/mhd/mhd_legal.c
index 7b1ba1c11..b7859da1c 100644
--- a/src/mhd/mhd_legal.c
+++ b/src/mhd/mhd_legal.c
@@ -155,7 +155,7 @@ language_matches (const char *language_pattern,
* @param legal legal document to serve
* @return MHD result code
*/
-int
+MHD_RESULT
TALER_MHD_reply_legal (struct MHD_Connection *conn,
struct TALER_MHD_Legal *legal)
{
@@ -174,7 +174,7 @@ TALER_MHD_reply_legal (struct MHD_Connection *conn,
(0 == strcasecmp (etag,
legal->terms_etag)) )
{
- int ret;
+ MHD_RESULT ret;
resp = MHD_create_response_from_buffer (0,
NULL,
@@ -292,7 +292,7 @@ TALER_MHD_reply_legal (struct MHD_Connection *conn,
MHD_HTTP_HEADER_CONTENT_TYPE,
t->mime_type));
{
- int ret;
+ MHD_RESULT ret;
ret = MHD_queue_response (conn,
MHD_HTTP_OK,
diff --git a/src/mhd/mhd_responses.c b/src/mhd/mhd_responses.c
index 67b9097b8..45a9932d3 100644
--- a/src/mhd/mhd_responses.c
+++ b/src/mhd/mhd_responses.c
@@ -80,7 +80,7 @@ TALER_MHD_add_global_headers (struct MHD_Response *response)
* itself. This should eventually be fixed, see also
* https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
*/
-int
+MHD_RESULT
TALER_MHD_can_compress (struct MHD_Connection *connection)
{
const char *ae;
@@ -118,13 +118,13 @@ TALER_MHD_can_compress (struct MHD_Connection *connection)
* @param[in,out] buf_size pointer to initial size of @a buf
* @return #MHD_YES if @a buf was compressed
*/
-int
+MHD_RESULT
TALER_MHD_body_compress (void **buf,
size_t *buf_size)
{
Bytef *cbuf;
uLongf cbuf_size;
- int ret;
+ MHD_RESULT ret;
cbuf_size = compressBound (*buf_size);
cbuf = malloc (cbuf_size);
@@ -193,7 +193,7 @@ TALER_MHD_make_json (const json_t *json)
* @param response_code the http response code
* @return MHD result code
*/
-int
+MHD_RESULT
TALER_MHD_reply_json (struct MHD_Connection *connection,
const json_t *json,
unsigned int response_code)
@@ -201,7 +201,7 @@ TALER_MHD_reply_json (struct MHD_Connection *connection,
struct MHD_Response *response;
void *json_str;
size_t json_len;
- int is_compressed;
+ MHD_RESULT is_compressed;
json_str = json_dumps (json,
JSON_INDENT (2));
@@ -253,7 +253,7 @@ TALER_MHD_reply_json (struct MHD_Connection *connection,
}
{
- int ret;
+ MHD_RESULT ret;
ret = MHD_queue_response (connection,
response_code,
@@ -271,7 +271,7 @@ TALER_MHD_reply_json (struct MHD_Connection *connection,
* @param connection the MHD connection
* @return MHD result code
*/
-int
+MHD_RESULT
TALER_MHD_reply_cors_preflight (struct MHD_Connection *connection)
{
struct MHD_Response *response;
@@ -291,7 +291,7 @@ TALER_MHD_reply_cors_preflight (struct MHD_Connection *connection)
"*"));
{
- int ret;
+ MHD_RESULT ret;
ret = MHD_queue_response (connection,
MHD_HTTP_NO_CONTENT,
@@ -312,7 +312,7 @@ TALER_MHD_reply_cors_preflight (struct MHD_Connection *connection)
* @param ... varargs
* @return MHD result code
*/
-int
+MHD_RESULT
TALER_MHD_reply_json_pack (struct MHD_Connection *connection,
unsigned int response_code,
const char *fmt,
@@ -344,7 +344,7 @@ TALER_MHD_reply_json_pack (struct MHD_Connection *connection,
}
{
- int ret;
+ MHD_RESULT ret;
ret = TALER_MHD_reply_json (connection,
json,
@@ -426,7 +426,7 @@ TALER_MHD_make_error (enum TALER_ErrorCode ec,
* @param hint human readable hint about the error
* @return a MHD result code
*/
-int
+MHD_RESULT
TALER_MHD_reply_with_error (struct MHD_Connection *connection,
unsigned int http_status,
enum TALER_ErrorCode ec,
@@ -446,7 +446,7 @@ TALER_MHD_reply_with_error (struct MHD_Connection *connection,
* @param connection the MHD connection to use
* @return a MHD result code
*/
-int
+MHD_RESULT
TALER_MHD_reply_request_too_large (struct MHD_Connection *connection)
{
struct MHD_Response *response;
@@ -459,7 +459,7 @@ TALER_MHD_reply_request_too_large (struct MHD_Connection *connection)
TALER_MHD_add_global_headers (response);
{
- int ret;
+ MHD_RESULT ret;
ret = MHD_queue_response (connection,
MHD_HTTP_REQUEST_ENTITY_TOO_LARGE,
@@ -478,7 +478,7 @@ TALER_MHD_reply_request_too_large (struct MHD_Connection *connection)
* @param url where to redirect for the sources
* @return MHD result code
*/
-int
+MHD_RESULT
TALER_MHD_reply_agpl (struct MHD_Connection *connection,
const char *url)
{
@@ -510,7 +510,7 @@ TALER_MHD_reply_agpl (struct MHD_Connection *connection,
}
{
- int ret;
+ MHD_RESULT ret;
ret = MHD_queue_response (connection,
MHD_HTTP_FOUND,
@@ -532,7 +532,7 @@ TALER_MHD_reply_agpl (struct MHD_Connection *connection,
* @param body_size number of bytes in @a body
* @return MHD result code
*/
-int
+MHD_RESULT
TALER_MHD_reply_static (struct MHD_Connection *connection,
unsigned int http_status,
const char *mime_type,
@@ -556,7 +556,7 @@ TALER_MHD_reply_static (struct MHD_Connection *connection,
MHD_HTTP_HEADER_CONTENT_TYPE,
mime_type));
{
- int ret;
+ MHD_RESULT ret;
ret = MHD_queue_response (connection,
http_status,