commit 2ed154cad73b51ae38d2eb5ddda8e0cfb6140ca9 parent f1e8ba8d9b39bd7d884910f6d1735ac8f6e417c3 Author: Christian Grothoff <christian@grothoff.org> Date: Sat, 2 May 2026 22:01:24 +0200 fix missing MHD_RESULT modernization Diffstat:
23 files changed, 65 insertions(+), 65 deletions(-)
diff --git a/src/authorization/anastasis_authorization_plugin_email.c b/src/authorization/anastasis_authorization_plugin_email.c @@ -321,7 +321,7 @@ static enum ANASTASIS_AUTHORIZATION_ChallengeResult email_challenge (struct ANASTASIS_AUTHORIZATION_State *as, struct MHD_Connection *connection) { - MHD_RESULT mres; + enum MHD_Result mres; const char *mime; const char *lang; diff --git a/src/authorization/anastasis_authorization_plugin_file.c b/src/authorization/anastasis_authorization_plugin_file.c @@ -187,7 +187,7 @@ file_challenge (struct ANASTASIS_AUTHORIZATION_State *as, if (NULL == f) { struct MHD_Response *resp; - MHD_RESULT mres; + enum MHD_Result mres; GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, "open", @@ -209,7 +209,7 @@ file_challenge (struct ANASTASIS_AUTHORIZATION_State *as, as->code)) { struct MHD_Response *resp; - MHD_RESULT mres; + enum MHD_Result mres; GNUNET_break (0 == fclose (f)); resp = TALER_MHD_make_error (TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE, @@ -258,7 +258,7 @@ file_challenge (struct ANASTASIS_AUTHORIZATION_State *as, } { - MHD_RESULT mres; + enum MHD_Result mres; mres = MHD_queue_response (connection, MHD_HTTP_OK, diff --git a/src/authorization/anastasis_authorization_plugin_iban.c b/src/authorization/anastasis_authorization_plugin_iban.c @@ -423,7 +423,7 @@ iban_challenge (struct ANASTASIS_AUTHORIZATION_State *as, struct IBAN_Context *ctx = as->ctx; const char *mime; const char *lang; - MHD_RESULT mres; + enum MHD_Result mres; mime = MHD_lookup_connection_value (connection, MHD_HEADER_KIND, @@ -524,7 +524,7 @@ iban_solve (struct ANASTASIS_AUTHORIZATION_State *as, { struct IBAN_Context *ctx = as->ctx; struct ANASTASIS_DatabasePlugin *db = ctx->ac->db; - MHD_RESULT mres; + enum MHD_Result mres; enum GNUNET_DB_QueryStatus qs; struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get (); struct GNUNET_TIME_Timestamp after; diff --git a/src/authorization/anastasis_authorization_plugin_post.c b/src/authorization/anastasis_authorization_plugin_post.c @@ -361,7 +361,7 @@ post_challenge (struct ANASTASIS_AUTHORIZATION_State *as, { const char *mime; const char *lang; - MHD_RESULT mres; + enum MHD_Result mres; const char *name; const char *street; const char *city; diff --git a/src/authorization/anastasis_authorization_plugin_sms.c b/src/authorization/anastasis_authorization_plugin_sms.c @@ -320,7 +320,7 @@ static enum ANASTASIS_AUTHORIZATION_ChallengeResult sms_challenge (struct ANASTASIS_AUTHORIZATION_State *as, struct MHD_Connection *connection) { - MHD_RESULT mres; + enum MHD_Result mres; const char *mime; const char *lang; diff --git a/src/authorization/anastasis_authorization_plugin_totp.c b/src/authorization/anastasis_authorization_plugin_totp.c @@ -259,7 +259,7 @@ totp_solve (struct ANASTASIS_AUTHORIZATION_State *as, const struct GNUNET_HashCode *challenge_response, struct MHD_Connection *connection) { - MHD_RESULT mres; + enum MHD_Result mres; const char *mime; const char *lang; diff --git a/src/backend/anastasis-httpd.c b/src/backend/anastasis-httpd.c @@ -221,7 +221,7 @@ AH_trigger_curl (void) * #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/backend/anastasis-httpd.h b/src/backend/anastasis-httpd.h @@ -74,8 +74,8 @@ struct AH_RequestHandler * @param connection the MHD connection to handle * @return MHD result code */ - MHD_RESULT (*handler)(struct AH_RequestHandler *rh, - struct MHD_Connection *connection); + enum MHD_Result (*handler)(struct AH_RequestHandler *rh, + struct MHD_Connection *connection); /** * Default response code. diff --git a/src/backend/anastasis-httpd_config.c b/src/backend/anastasis-httpd_config.c @@ -74,7 +74,7 @@ add_methods (void *cls, } -MHD_RESULT +enum MHD_Result AH_handler_config (struct AH_RequestHandler *rh, struct MHD_Connection *connection) { diff --git a/src/backend/anastasis-httpd_config.h b/src/backend/anastasis-httpd_config.h @@ -32,7 +32,7 @@ * @param connection the MHD connection to handle * @return MHD result code */ -MHD_RESULT +enum MHD_Result AH_handler_config (struct AH_RequestHandler *rh, struct MHD_Connection *connection); diff --git a/src/backend/anastasis-httpd_mhd.c b/src/backend/anastasis-httpd_mhd.c @@ -27,7 +27,7 @@ #include "anastasis-httpd_mhd.h" -MHD_RESULT +enum MHD_Result TMH_MHD_handler_static_response (struct AH_RequestHandler *rh, struct MHD_Connection *connection) { @@ -41,7 +41,7 @@ TMH_MHD_handler_static_response (struct AH_RequestHandler *rh, } -MHD_RESULT +enum MHD_Result TMH_MHD_handler_agpl_redirect (struct AH_RequestHandler *rh, struct MHD_Connection *connection) { diff --git a/src/backend/anastasis-httpd_mhd.h b/src/backend/anastasis-httpd_mhd.h @@ -36,7 +36,7 @@ * @param connection the MHD connection to handle * @return MHD result code */ -MHD_RESULT +enum MHD_Result TMH_MHD_handler_static_response (struct AH_RequestHandler *rh, struct MHD_Connection *connection); @@ -49,7 +49,7 @@ TMH_MHD_handler_static_response (struct AH_RequestHandler *rh, * @param connection the MHD connection to handle * @return MHD result code */ -MHD_RESULT +enum MHD_Result TMH_MHD_handler_agpl_redirect (struct AH_RequestHandler *rh, struct MHD_Connection *connection); diff --git a/src/backend/anastasis-httpd_policy-meta.c b/src/backend/anastasis-httpd_policy-meta.c @@ -79,7 +79,7 @@ build_meta_result (void *cls, * @param account_pub account to query * @return MHD result code */ -static MHD_RESULT +static enum MHD_Result return_policy_meta ( struct MHD_Connection *connection, const struct ANASTASIS_CRYPTO_AccountPublicKeyP *account_pub) @@ -150,7 +150,7 @@ return_policy_meta ( } -MHD_RESULT +enum MHD_Result AH_policy_meta_get ( struct MHD_Connection *connection, const struct ANASTASIS_CRYPTO_AccountPublicKeyP *account_pub) diff --git a/src/backend/anastasis-httpd_policy-meta.h b/src/backend/anastasis-httpd_policy-meta.h @@ -32,7 +32,7 @@ * @param account_pub public key of the account * @return MHD result code */ -MHD_RESULT +enum MHD_Result AH_policy_meta_get ( struct MHD_Connection *connection, const struct ANASTASIS_CRYPTO_AccountPublicKeyP *account_pub); diff --git a/src/backend/anastasis-httpd_policy-upload.c b/src/backend/anastasis-httpd_policy-upload.c @@ -564,7 +564,7 @@ await_payment (struct PolicyUploadContext *puc) * @param puc context to begin payment for. * @return MHD status code */ -static MHD_RESULT +static enum MHD_Result begin_payment (struct PolicyUploadContext *puc) { json_t *order; @@ -635,7 +635,7 @@ begin_payment (struct PolicyUploadContext *puc) * @param puc context to prepare payment for * @return MHD status */ -static MHD_RESULT +static enum MHD_Result prepare_payment (struct PolicyUploadContext *puc) { if (! puc->payment_identifier_provided) @@ -654,7 +654,7 @@ prepare_payment (struct PolicyUploadContext *puc) } -MHD_RESULT +enum MHD_Result AH_handler_policy_post ( struct MHD_Connection *connection, struct TM_HandlerContext *hc, @@ -1004,7 +1004,7 @@ AH_handler_policy_post ( { /* Refuse upload: we already have that backup! */ struct MHD_Response *resp; - MHD_RESULT ret; + enum MHD_Result ret; char version_s[14]; GNUNET_snprintf (version_s, @@ -1036,7 +1036,7 @@ AH_handler_policy_post ( if (NULL != puc->resp) { - MHD_RESULT ret; + enum MHD_Result ret; /* We generated a response asynchronously, queue that */ GNUNET_log (GNUNET_ERROR_TYPE_INFO, @@ -1161,7 +1161,7 @@ AH_handler_policy_post ( theoretically happen if another equivalent upload succeeded since we last checked!) */ struct MHD_Response *resp; - MHD_RESULT ret; + enum MHD_Result ret; resp = MHD_create_response_from_buffer (0, NULL, @@ -1183,7 +1183,7 @@ AH_handler_policy_post ( /* generate main (204) standard success reply */ { struct MHD_Response *resp; - MHD_RESULT ret; + enum MHD_Result ret; resp = MHD_create_response_from_buffer (0, NULL, diff --git a/src/backend/anastasis-httpd_policy.c b/src/backend/anastasis-httpd_policy.c @@ -38,7 +38,7 @@ * @param account_pub account to query * @return MHD result code */ -static MHD_RESULT +static enum MHD_Result return_policy (struct MHD_Connection *connection, const struct ANASTASIS_CRYPTO_AccountPublicKeyP *account_pub) { @@ -149,7 +149,7 @@ return_policy (struct MHD_Connection *connection, GNUNET_free (etagq); } { - MHD_RESULT ret; + enum MHD_Result ret; ret = MHD_queue_response (connection, MHD_HTTP_OK, @@ -160,13 +160,13 @@ return_policy (struct MHD_Connection *connection, } -MHD_RESULT +enum MHD_Result AH_policy_get (struct MHD_Connection *connection, const struct ANASTASIS_CRYPTO_AccountPublicKeyP *account_pub) { struct GNUNET_HashCode recovery_data_hash; enum ANASTASIS_DB_AccountStatus as; - MHD_RESULT ret; + enum MHD_Result ret; uint32_t version; struct GNUNET_TIME_Timestamp expiration; diff --git a/src/backend/anastasis-httpd_policy.h b/src/backend/anastasis-httpd_policy.h @@ -39,7 +39,7 @@ AH_resume_all_bc (void); * @param account_pub public key of the account * @return MHD result code */ -MHD_RESULT +enum MHD_Result AH_policy_get (struct MHD_Connection *connection, const struct ANASTASIS_CRYPTO_AccountPublicKeyP *account_pub); @@ -54,7 +54,7 @@ AH_policy_get (struct MHD_Connection *connection, * @param upload_data_size number of bytes (left) in @a upload_data * @return MHD result code */ -MHD_RESULT +enum MHD_Result AH_handler_policy_post ( struct MHD_Connection *connection, struct TM_HandlerContext *hc, diff --git a/src/backend/anastasis-httpd_terms.c b/src/backend/anastasis-httpd_terms.c @@ -36,7 +36,7 @@ static struct TALER_MHD_Legal *tos; static struct TALER_MHD_Legal *pp; -MHD_RESULT +enum MHD_Result AH_handler_terms (struct AH_RequestHandler *rh, struct MHD_Connection *connection) { @@ -46,7 +46,7 @@ AH_handler_terms (struct AH_RequestHandler *rh, } -MHD_RESULT +enum MHD_Result AH_handler_privacy (struct AH_RequestHandler *rh, struct MHD_Connection *connection) { diff --git a/src/backend/anastasis-httpd_terms.h b/src/backend/anastasis-httpd_terms.h @@ -32,7 +32,7 @@ * @param connection the MHD connection to handle * @return MHD result code */ -MHD_RESULT +enum MHD_Result AH_handler_terms (struct AH_RequestHandler *rh, struct MHD_Connection *connection); @@ -44,7 +44,7 @@ AH_handler_terms (struct AH_RequestHandler *rh, * @param connection the MHD connection to handle * @return MHD result code */ -MHD_RESULT +enum MHD_Result AH_handler_privacy (struct AH_RequestHandler *rh, struct MHD_Connection *connection); diff --git a/src/backend/anastasis-httpd_truth-challenge.c b/src/backend/anastasis-httpd_truth-challenge.c @@ -246,7 +246,7 @@ static struct GNUNET_SCHEDULER_Task *to_task; * @param gc request to answer for * @return MHD status code */ -static MHD_RESULT +static enum MHD_Result reply_rate_limited (const struct ChallengeContext *gc) { return TALER_MHD_REPLY_JSON_PACK ( @@ -763,7 +763,7 @@ check_payment_cb (void *cls, * @param gc context to begin payment for. * @return MHD status code */ -static MHD_RESULT +static enum MHD_Result begin_payment (struct ChallengeContext *gc) { enum GNUNET_DB_QueryStatus qs; @@ -908,7 +908,7 @@ gc_suspended (struct ChallengeContext *gc) * @param connection the connection we are handling * @param gc our overall handler context */ -static MHD_RESULT +static enum MHD_Result run_authorization_process (struct MHD_Connection *connection, struct ChallengeContext *gc) { @@ -974,7 +974,7 @@ run_authorization_process (struct MHD_Connection *connection, } -MHD_RESULT +enum MHD_Result AH_handler_truth_challenge ( struct MHD_Connection *connection, struct TM_HandlerContext *hc, @@ -1009,7 +1009,7 @@ AH_handler_truth_challenge ( gc->suspended = false; if (NULL != gc->resp) { - MHD_RESULT ret; + enum MHD_Result ret; /* We generated a response asynchronously, queue that */ ret = MHD_queue_response (connection, @@ -1137,7 +1137,7 @@ AH_handler_truth_challenge ( AH_cfg); if (NULL == gc->authorization) { - MHD_RESULT ret; + enum MHD_Result ret; ret = TALER_MHD_reply_with_error ( connection, @@ -1152,7 +1152,7 @@ AH_handler_truth_challenge ( if (gc->authorization->user_provided_code) { - MHD_RESULT ret; + enum MHD_Result ret; GNUNET_break_op (0); ret = TALER_MHD_reply_with_error (connection, diff --git a/src/backend/anastasis-httpd_truth-solve.c b/src/backend/anastasis-httpd_truth-solve.c @@ -198,7 +198,7 @@ static struct GNUNET_SCHEDULER_Task *to_task; * @param gc request to answer for * @return MHD status code */ -static MHD_RESULT +static enum MHD_Result reply_rate_limited (const struct SolveContext *gc) { if (NULL != gc->authorization) @@ -601,7 +601,7 @@ check_payment_cb (void *cls, * @param gc context to begin payment for. * @return MHD status code */ -static MHD_RESULT +static enum MHD_Result begin_payment (struct SolveContext *gc) { enum GNUNET_DB_QueryStatus qs; @@ -712,7 +712,7 @@ begin_payment (struct SolveContext *gc) * @param connection the connection to respond upon * @return MHD status code */ -static MHD_RESULT +static enum MHD_Result return_key_share ( const struct ANASTASIS_CRYPTO_TruthUUIDP *truth_uuid, struct MHD_Connection *connection) @@ -755,7 +755,7 @@ return_key_share ( { struct MHD_Response *resp; - MHD_RESULT ret; + enum MHD_Result ret; resp = MHD_create_response_from_buffer (sizeof (encrypted_keyshare), &encrypted_keyshare, @@ -812,7 +812,7 @@ gc_suspended (struct SolveContext *gc) * @param connection the connection we are handling * @param gc our overall handler context */ -static MHD_RESULT +static enum MHD_Result run_authorization_process (struct MHD_Connection *connection, struct SolveContext *gc) { @@ -959,7 +959,7 @@ rate_limit (struct SolveContext *gc) * @param decrypted_truth_size number of bytes in @a decrypted_truth * @return MHD status code */ -static MHD_RESULT +static enum MHD_Result handle_security_question (struct SolveContext *gc, const void *decrypted_truth, size_t decrypted_truth_size) @@ -1005,7 +1005,7 @@ handle_security_question (struct SolveContext *gc, * @param decrypted_truth_size number of bytes in @a decrypted_truth * @return MHD status code */ -static MHD_RESULT +static enum MHD_Result direct_validation (struct SolveContext *gc, const void *decrypted_truth, size_t decrypted_truth_size) @@ -1075,7 +1075,7 @@ direct_validation (struct SolveContext *gc, * @param decrypted_truth_size number of bytes in @a decrypted_truth * @return MHD status code */ -static MHD_RESULT +static enum MHD_Result iban_validation (struct SolveContext *gc, uint64_t code, const void *decrypted_truth, @@ -1130,7 +1130,7 @@ iban_validation (struct SolveContext *gc, } -MHD_RESULT +enum MHD_Result AH_handler_truth_solve ( struct MHD_Connection *connection, struct TM_HandlerContext *hc, @@ -1168,7 +1168,7 @@ AH_handler_truth_solve ( gc->suspended = false; if (NULL != gc->resp) { - MHD_RESULT ret; + enum MHD_Result ret; /* We generated a response asynchronously, queue that */ ret = MHD_queue_response (connection, @@ -1290,7 +1290,7 @@ AH_handler_truth_solve ( AH_cfg); if (NULL == gc->authorization) { - MHD_RESULT ret; + enum MHD_Result ret; ret = TALER_MHD_reply_with_error ( connection, @@ -1395,7 +1395,7 @@ AH_handler_truth_solve ( but check that the hash matches */ if (is_question) { - MHD_RESULT ret; + enum MHD_Result ret; ret = handle_security_question (gc, decrypted_truth, @@ -1414,7 +1414,7 @@ AH_handler_truth_solve ( GNUNET_free (truth_mime); if (gc->authorization->user_provided_code) { - MHD_RESULT res; + enum MHD_Result res; if (GNUNET_TIME_absolute_is_past (gc->timeout)) { @@ -1469,7 +1469,7 @@ AH_handler_truth_solve ( case ANASTASIS_DB_CODE_STATUS_VALID_CODE_STORED: if (! satisfied) { - MHD_RESULT res; + enum MHD_Result res; res = iban_validation (gc, code, diff --git a/src/backend/anastasis-httpd_truth-upload.c b/src/backend/anastasis-httpd_truth-upload.c @@ -472,7 +472,7 @@ check_payment_cb (void *cls, * @param tuc context to begin payment for. * @return MHD status code */ -static MHD_RESULT +static enum MHD_Result begin_payment (struct TruthUploadContext *tuc) { char *order_id; @@ -519,7 +519,7 @@ begin_payment (struct TruthUploadContext *tuc) } -MHD_RESULT +enum MHD_Result AH_handler_truth_post ( struct MHD_Connection *connection, struct TM_HandlerContext *hc, @@ -528,7 +528,7 @@ AH_handler_truth_post ( size_t *truth_data_size) { struct TruthUploadContext *tuc = hc->ctx; - MHD_RESULT ret; + enum MHD_Result ret; int res; struct ANASTASIS_CRYPTO_EncryptedKeyShareP key_share_data; void *encrypted_truth; diff --git a/src/backend/anastasis-httpd_truth.h b/src/backend/anastasis-httpd_truth.h @@ -54,7 +54,7 @@ AH_truth_upload_shutdown (void); * @param truth_data_size number of bytes (left) in @a truth_data * @return MHD result code */ -MHD_RESULT +enum MHD_Result AH_handler_truth_post ( struct MHD_Connection *connection, struct TM_HandlerContext *hc, @@ -73,7 +73,7 @@ AH_handler_truth_post ( * @param truth_data_size number of bytes (left) in @a truth_data * @return MHD result code */ -MHD_RESULT +enum MHD_Result AH_handler_truth_solve ( struct MHD_Connection *connection, struct TM_HandlerContext *hc, @@ -92,7 +92,7 @@ AH_handler_truth_solve ( * @param truth_data_size number of bytes (left) in @a truth_data * @return MHD result code */ -MHD_RESULT +enum MHD_Result AH_handler_truth_challenge ( struct MHD_Connection *connection, struct TM_HandlerContext *hc,