commit ddec0bfcadd6544cd5dadb6757bac5509d59fa48 parent 4dd4a4991becdccabdd80613880c47f741d9609b Author: Christian Grothoff <christian@grothoff.org> Date: Thu, 16 Apr 2026 09:31:53 +0200 get rid of compatibility MHD_RESULT wrapper Diffstat:
24 files changed, 47 insertions(+), 47 deletions(-)
diff --git a/src/challenger/challenger-httpd.c b/src/challenger/challenger-httpd.c @@ -188,7 +188,7 @@ full_url_track_callback (void *cls, * #MHD_NO if the socket must be closed due to a serious * error while handling the request */ -static MHD_RESULT +static enum MHD_Result url_handler (void *cls, struct MHD_Connection *connection, const char *url, diff --git a/src/challenger/challenger-httpd.h b/src/challenger/challenger-httpd.h @@ -118,9 +118,9 @@ struct CH_RequestHandler * @param[in,out] upload_data_size number of bytes (left) in @a upload_data * @return MHD result code */ - MHD_RESULT (*handler)(struct CH_HandlerContext *hc, - const char *upload_data, - size_t *upload_data_size); + enum MHD_Result (*handler)(struct CH_HandlerContext *hc, + const char *upload_data, + size_t *upload_data_size); }; diff --git a/src/challenger/challenger-httpd_agpl.c b/src/challenger/challenger-httpd_agpl.c @@ -23,7 +23,7 @@ #include <taler/taler_mhd_lib.h> -MHD_RESULT +enum MHD_Result CH_handler_agpl (struct CH_HandlerContext *hc, const char *upload_data, size_t *upload_data_size) diff --git a/src/challenger/challenger-httpd_agpl.h b/src/challenger/challenger-httpd_agpl.h @@ -31,7 +31,7 @@ * @param[in,out] upload_data_size number of bytes (left) in @a upload_data * @return MHD result code */ -MHD_RESULT +enum MHD_Result CH_handler_agpl (struct CH_HandlerContext *hc, const char *upload_data, size_t *upload_data_size); diff --git a/src/challenger/challenger-httpd_authorize.c b/src/challenger/challenger-httpd_authorize.c @@ -42,7 +42,7 @@ * @param ec error code to return * @param hint human-readable hint to give */ -static MHD_RESULT +static enum MHD_Result reply_error (struct CH_HandlerContext *hc, const char *template, unsigned int http_status, @@ -57,7 +57,7 @@ reply_error (struct CH_HandlerContext *hc, } -MHD_RESULT +enum MHD_Result CH_handler_authorize (struct CH_HandlerContext *hc, const char *upload_data, size_t *upload_data_size) @@ -300,7 +300,7 @@ CH_handler_authorize (struct CH_HandlerContext *hc, { json_t *args; struct MHD_Response *resp; - MHD_RESULT res; + enum MHD_Result res; json_t *ro; ro = json_object_get (last_address, diff --git a/src/challenger/challenger-httpd_authorize.h b/src/challenger/challenger-httpd_authorize.h @@ -32,7 +32,7 @@ * @param[in,out] upload_data_size remaining data in @a upload_data, to be updated * @return MHD result code */ -MHD_RESULT +enum MHD_Result CH_handler_authorize (struct CH_HandlerContext *hc, const char *upload_data, size_t *upload_data_size); diff --git a/src/challenger/challenger-httpd_challenge.c b/src/challenger/challenger-httpd_challenge.c @@ -262,7 +262,7 @@ cleanup_ctx (void *cls) * @param ec error code to return * @param hint human-readable hint to give */ -static MHD_RESULT +static enum MHD_Result reply_error (struct ChallengeContext *bc, const char *template, unsigned int http_status, @@ -331,7 +331,7 @@ send_tan (struct ChallengeContext *bc) p = GNUNET_DISK_pipe (GNUNET_DISK_PF_BLOCKING_RW); if (NULL == p) { - MHD_RESULT mres; + enum MHD_Result mres; GNUNET_break (0); mres = reply_error (bc, @@ -377,7 +377,7 @@ send_tan (struct ChallengeContext *bc) } if (NULL == bc->child) { - MHD_RESULT mres; + enum MHD_Result mres; GNUNET_break (0); GNUNET_break (GNUNET_OK == @@ -415,7 +415,7 @@ send_tan (struct ChallengeContext *bc) json_decref (root); if (0 != mret) { - MHD_RESULT mres; + enum MHD_Result mres; GNUNET_break (0); mres = reply_error (bc, @@ -453,7 +453,7 @@ send_tan (struct ChallengeContext *bc) left); if (ret <= 0) { - MHD_RESULT mres; + enum MHD_Result mres; GNUNET_break (0); mres = reply_error (bc, @@ -607,7 +607,7 @@ check_restrictions (const json_t *address) } -MHD_RESULT +enum MHD_Result CH_handler_challenge (struct CH_HandlerContext *hc, const char *upload_data, size_t *upload_data_size) @@ -880,7 +880,7 @@ CH_handler_challenge (struct CH_HandlerContext *hc, if (bc->solved) { struct MHD_Response *response; - MHD_RESULT ret; + enum MHD_Result ret; json_t *args = GNUNET_JSON_PACK ( GNUNET_JSON_pack_string ("type", @@ -943,7 +943,7 @@ CH_handler_challenge (struct CH_HandlerContext *hc, json_t *args; struct MHD_Response *resp; unsigned int http_status; - MHD_RESULT res; + enum MHD_Result res; GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Returning success from challenge with %u attempts left\n", diff --git a/src/challenger/challenger-httpd_challenge.h b/src/challenger/challenger-httpd_challenge.h @@ -39,7 +39,7 @@ CH_wakeup_challenge_on_shutdown (void); * @param[in,out] upload_data_size remaining data in @a upload_data, to be updated * @return MHD result code */ -MHD_RESULT +enum MHD_Result CH_handler_challenge (struct CH_HandlerContext *hc, const char *upload_data, size_t *upload_data_size); diff --git a/src/challenger/challenger-httpd_common.c b/src/challenger/challenger-httpd_common.c @@ -147,7 +147,7 @@ CH_code_to_nonce (const char *code, } -MHD_RESULT +enum MHD_Result CH_reply_with_oauth_error ( struct MHD_Connection *connection, unsigned int http_status, @@ -156,7 +156,7 @@ CH_reply_with_oauth_error ( const char *detail) { struct MHD_Response *resp; - MHD_RESULT mret; + enum MHD_Result mret; resp = TALER_MHD_make_json_steal ( GNUNET_JSON_PACK ( @@ -180,7 +180,7 @@ CH_reply_with_oauth_error ( } -MHD_RESULT +enum MHD_Result TALER_MHD_redirect_with_oauth_status ( struct MHD_Connection *connection, const char *client_redirect_uri, @@ -268,7 +268,7 @@ TALER_MHD_redirect_with_oauth_status ( } { - MHD_RESULT ret; + enum MHD_Result ret; ret = MHD_queue_response (connection, http_status, diff --git a/src/challenger/challenger-httpd_common.h b/src/challenger/challenger-httpd_common.h @@ -88,7 +88,7 @@ CH_code_to_nonce (const char *code, * @param detail additional optional detail about the error * @return a MHD result code */ -MHD_RESULT +enum MHD_Result CH_reply_with_oauth_error ( struct MHD_Connection *connection, unsigned int http_status, @@ -110,7 +110,7 @@ CH_reply_with_oauth_error ( * @param oauth_error_uri URI with additional information about the error, optional, can be NULL * @return MHD response queueing status */ -MHD_RESULT +enum MHD_Result TALER_MHD_redirect_with_oauth_status ( struct MHD_Connection *connection, const char *client_redirect_uri, diff --git a/src/challenger/challenger-httpd_config.c b/src/challenger/challenger-httpd_config.c @@ -35,7 +35,7 @@ */ -MHD_RESULT +enum MHD_Result CH_handler_config (struct CH_HandlerContext *hc, const char *upload_data, size_t *upload_data_size) diff --git a/src/challenger/challenger-httpd_config.h b/src/challenger/challenger-httpd_config.h @@ -31,7 +31,7 @@ * @param[in,out] upload_data_size number of bytes (left) in @a upload_data * @return MHD result code */ -MHD_RESULT +enum MHD_Result CH_handler_config (struct CH_HandlerContext *hc, const char *upload_data, size_t *upload_data_size); diff --git a/src/challenger/challenger-httpd_info.c b/src/challenger/challenger-httpd_info.c @@ -35,7 +35,7 @@ */ #define MAX_RETRIES 3 -MHD_RESULT +enum MHD_Result CH_handler_info (struct CH_HandlerContext *hc, const char *upload_data, size_t *upload_data_size) diff --git a/src/challenger/challenger-httpd_info.h b/src/challenger/challenger-httpd_info.h @@ -32,7 +32,7 @@ * @param[in,out] upload_data_size remaining data in @a upload_data, to be updated * @return MHD result code */ -MHD_RESULT +enum MHD_Result CH_handler_info (struct CH_HandlerContext *hc, const char *upload_data, size_t *upload_data_size); diff --git a/src/challenger/challenger-httpd_mhd.c b/src/challenger/challenger-httpd_mhd.c @@ -23,7 +23,7 @@ #include "challenger-httpd_mhd.h" -MHD_RESULT +enum MHD_Result CH_MHD_handler_root (struct CH_HandlerContext *hc, const char *upload_data, size_t *upload_data_size) @@ -41,7 +41,7 @@ CH_MHD_handler_root (struct CH_HandlerContext *hc, } -MHD_RESULT +enum MHD_Result CH_MHD_handler_agpl_redirect (struct CH_HandlerContext *hc, const char *upload_data, size_t *upload_data_size) diff --git a/src/challenger/challenger-httpd_mhd.h b/src/challenger/challenger-httpd_mhd.h @@ -36,7 +36,7 @@ * @param[in,out] upload_data_size number of bytes (left) in @a upload_data * @return MHD result code */ -MHD_RESULT +enum MHD_Result CH_MHD_handler_root (struct CH_HandlerContext *hc, const char *upload_data, size_t *upload_data_size); @@ -51,7 +51,7 @@ CH_MHD_handler_root (struct CH_HandlerContext *hc, * @param[in,out] upload_data_size number of bytes (left) in @a upload_data * @return MHD result code */ -MHD_RESULT +enum MHD_Result CH_MHD_handler_agpl_redirect (struct CH_HandlerContext *hc, const char *upload_data, size_t *upload_data_size); diff --git a/src/challenger/challenger-httpd_setup.c b/src/challenger/challenger-httpd_setup.c @@ -77,7 +77,7 @@ request_done (void *ctx) } -MHD_RESULT +enum MHD_Result CH_handler_setup (struct CH_HandlerContext *hc, const char *upload_data, size_t *upload_data_size) diff --git a/src/challenger/challenger-httpd_setup.h b/src/challenger/challenger-httpd_setup.h @@ -32,7 +32,7 @@ * @param[in,out] upload_data_size remaining data in @a upload_data, to be updated * @return MHD result code */ -MHD_RESULT +enum MHD_Result CH_handler_setup (struct CH_HandlerContext *hc, const char *upload_data, size_t *upload_data_size); diff --git a/src/challenger/challenger-httpd_solve.c b/src/challenger/challenger-httpd_solve.c @@ -123,7 +123,7 @@ cleanup_ctx (void *cls) * @param ec error code to return * @param hint human-readable hint to give */ -static MHD_RESULT +static enum MHD_Result reply_error (struct SolveContext *bc, const char *template, unsigned int http_status, @@ -191,7 +191,7 @@ post_iter (void *cls, } -MHD_RESULT +enum MHD_Result CH_handler_solve (struct CH_HandlerContext *hc, const char *upload_data, size_t *upload_data_size) @@ -316,7 +316,7 @@ CH_handler_solve (struct CH_HandlerContext *hc, } if (! solved) { - MHD_RESULT ret; + enum MHD_Result ret; json_t *details; if ( (NULL != bc->state) && @@ -483,7 +483,7 @@ CH_handler_solve (struct CH_HandlerContext *hc, } { - MHD_RESULT ret; + enum MHD_Result ret; ret = MHD_queue_response (hc->connection, http_status, diff --git a/src/challenger/challenger-httpd_solve.h b/src/challenger/challenger-httpd_solve.h @@ -32,7 +32,7 @@ * @param[in,out] upload_data_size remaining data in @a upload_data, to be updated * @return MHD result code */ -MHD_RESULT +enum MHD_Result CH_handler_solve (struct CH_HandlerContext *hc, const char *upload_data, size_t *upload_data_size); diff --git a/src/challenger/challenger-httpd_spa.c b/src/challenger/challenger-httpd_spa.c @@ -33,7 +33,7 @@ static struct TALER_MHD_Spa *spa; -MHD_RESULT +enum MHD_Result CH_handler_spa (struct CH_HandlerContext *hc, const char *upload_data, size_t *upload_data_size) @@ -91,7 +91,7 @@ get_spa_fini () * @param hc handler context * @return MHD result code */ -MHD_RESULT +enum MHD_Result CH_spa_redirect (struct CH_HandlerContext *hc, const char *upload_data, size_t *upload_data_size) @@ -136,7 +136,7 @@ CH_spa_redirect (struct CH_HandlerContext *hc, } { - MHD_RESULT ret; + enum MHD_Result ret; ret = MHD_queue_response (hc->connection, MHD_HTTP_FOUND, diff --git a/src/challenger/challenger-httpd_spa.h b/src/challenger/challenger-httpd_spa.h @@ -32,7 +32,7 @@ * @param[in,out] args remaining arguments (ignored) * @return #MHD_YES on success (reply queued), #MHD_NO on error (close connection) */ -MHD_RESULT +enum MHD_Result CH_handler_spa (struct CH_HandlerContext *hc, const char *upload_data, size_t *upload_data_size); @@ -56,7 +56,7 @@ CH_spa_init (void); * @param hc handler context * @return MHD result code */ -MHD_RESULT +enum MHD_Result CH_spa_redirect (struct CH_HandlerContext *hc, const char *upload_data, size_t *upload_data_size); diff --git a/src/challenger/challenger-httpd_token.c b/src/challenger/challenger-httpd_token.c @@ -195,7 +195,7 @@ post_iter (void *cls, } -MHD_RESULT +enum MHD_Result CH_handler_token (struct CH_HandlerContext *hc, const char *upload_data, size_t *upload_data_size) diff --git a/src/challenger/challenger-httpd_token.h b/src/challenger/challenger-httpd_token.h @@ -32,7 +32,7 @@ * @param[in,out] upload_data_size remaining data in @a upload_data, to be updated * @return MHD result code */ -MHD_RESULT +enum MHD_Result CH_handler_token (struct CH_HandlerContext *hc, const char *upload_data, size_t *upload_data_size);