sync

Backup service to store encrypted wallet databases (experimental)
Log | Files | Refs | Submodules | README | LICENSE

commit d7b24c54bacb9b4fec36d856721c9bb619949440
parent c89a6aefd12bb9584d5b5827a8afd59f26f5a86b
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu, 16 Apr 2026 09:32:24 +0200

get rid of compatibility MHD_RESULT wrapper

Diffstat:
Msrc/sync/sync-httpd.c | 4++--
Msrc/sync/sync-httpd.h | 10+++++-----
Msrc/sync/sync-httpd_backup.c | 8++++----
Msrc/sync/sync-httpd_backup.h | 6+++---
Msrc/sync/sync-httpd_backup_post.c | 16++++++++--------
Msrc/sync/sync-httpd_config.c | 2+-
Msrc/sync/sync-httpd_config.h | 2+-
Msrc/sync/sync-httpd_mhd.c | 4++--
Msrc/sync/sync-httpd_mhd.h | 4++--
9 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/src/sync/sync-httpd.c b/src/sync/sync-httpd.c @@ -151,7 +151,7 @@ struct TALER_Amount SH_insurance; * #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, @@ -284,7 +284,7 @@ url_handler (void *cls, (0 == strcasecmp (method, rh->method)) ) { - MHD_RESULT ret; + enum MHD_Result ret; ret = rh->handler (rh, connection, diff --git a/src/sync/sync-httpd.h b/src/sync/sync-httpd.h @@ -69,11 +69,11 @@ struct SH_RequestHandler * @param[in,out] upload_data_size number of bytes (left) in @a upload_data * @return MHD result code */ - MHD_RESULT (*handler)(struct SH_RequestHandler *rh, - struct MHD_Connection *connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size); + enum MHD_Result (*handler)(struct SH_RequestHandler *rh, + struct MHD_Connection *connection, + void **connection_cls, + const char *upload_data, + size_t *upload_data_size); /** * Default response code. diff --git a/src/sync/sync-httpd_backup.c b/src/sync/sync-httpd_backup.c @@ -32,13 +32,13 @@ * @param account public key of the account the request is for * @return MHD result code */ -MHD_RESULT +enum MHD_Result SH_backup_get (struct MHD_Connection *connection, const struct SYNC_AccountPublicKeyP *account) { struct GNUNET_HashCode backup_hash; enum SYNC_DB_QueryStatus qs; - MHD_RESULT ret; + enum MHD_Result ret; qs = SYNCDB_lookup_account_TR ( account, @@ -151,14 +151,14 @@ SH_backup_get (struct MHD_Connection *connection, * with on success (#MHD_HTTP_OK or #MHD_HTTP_CONFLICT) * @return MHD result code */ -MHD_RESULT +enum MHD_Result SH_return_backup (struct MHD_Connection *connection, const struct SYNC_AccountPublicKeyP *account, unsigned int default_http_status) { enum SYNC_DB_QueryStatus qs; struct MHD_Response *resp; - MHD_RESULT ret; + enum MHD_Result ret; struct SYNC_AccountSignatureP account_sig; struct GNUNET_HashCode backup_hash; struct GNUNET_HashCode prev_hash; diff --git a/src/sync/sync-httpd_backup.h b/src/sync/sync-httpd_backup.h @@ -39,7 +39,7 @@ SH_resume_all_bc (void); * with on success (#MHD_HTTP_OK or #MHD_HTTP_CONFLICT) * @return MHD result code */ -MHD_RESULT +enum MHD_Result SH_return_backup (struct MHD_Connection *connection, const struct SYNC_AccountPublicKeyP *account, unsigned int default_http_status); @@ -53,7 +53,7 @@ SH_return_backup (struct MHD_Connection *connection, * @param account public key of the account the request is for * @return MHD result code */ -MHD_RESULT +enum MHD_Result SH_backup_get (struct MHD_Connection *connection, const struct SYNC_AccountPublicKeyP *account); @@ -68,7 +68,7 @@ SH_backup_get (struct MHD_Connection *connection, * @param[in,out] upload_data_size number of bytes (left) in @a upload_data * @return MHD result code */ -MHD_RESULT +enum MHD_Result SH_backup_post (struct MHD_Connection *connection, void **con_cls, const struct SYNC_AccountPublicKeyP *account, diff --git a/src/sync/sync-httpd_backup_post.c b/src/sync/sync-httpd_backup_post.c @@ -553,7 +553,7 @@ await_payment (struct BackupContext *bc, * #GNUNET_NO if payment is needed * @return MHD status code */ -static MHD_RESULT +static enum MHD_Result begin_payment (struct BackupContext *bc, int pay_req) { @@ -568,7 +568,7 @@ begin_payment (struct BackupContext *bc, if (qs < 0) { struct MHD_Response *resp; - MHD_RESULT ret; + enum MHD_Result ret; resp = TALER_MHD_make_error (TALER_EC_GENERIC_DB_FETCH_FAILED, "pending payments"); @@ -631,7 +631,7 @@ begin_payment (struct BackupContext *bc, * @param qs query status to handle * @return #MHD_YES or #MHD_NO */ -static MHD_RESULT +static enum MHD_Result handle_database_error (struct BackupContext *bc, enum SYNC_DB_QueryStatus qs) { @@ -697,7 +697,7 @@ handle_database_error (struct BackupContext *bc, } -MHD_RESULT +enum MHD_Result SH_backup_post (struct MHD_Connection *connection, void **con_cls, const struct SYNC_AccountPublicKeyP *account, @@ -879,7 +879,7 @@ SH_backup_post (struct MHD_Connection *connection, { /* Refuse upload: we already have that backup! */ struct MHD_Response *resp; - MHD_RESULT ret; + enum MHD_Result ret; resp = MHD_create_response_from_buffer (0, NULL, @@ -949,7 +949,7 @@ SH_backup_post (struct MHD_Connection *connection, } if (NULL != bc->resp) { - MHD_RESULT ret; + enum MHD_Result ret; /* We generated a response asynchronously, queue that */ GNUNET_log (GNUNET_ERROR_TYPE_INFO, @@ -1018,7 +1018,7 @@ SH_backup_post (struct MHD_Connection *connection, 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, @@ -1037,7 +1037,7 @@ SH_backup_post (struct MHD_Connection *connection, /* 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/sync/sync-httpd_config.c b/src/sync/sync-httpd_config.c @@ -31,7 +31,7 @@ * to be created */ -MHD_RESULT +enum MHD_Result SH_handler_config (struct SH_RequestHandler *rh, struct MHD_Connection *connection, void **connection_cls, diff --git a/src/sync/sync-httpd_config.h b/src/sync/sync-httpd_config.h @@ -33,7 +33,7 @@ * @param[in,out] upload_data_size number of bytes (left) in @a upload_data * @return MHD result code */ -MHD_RESULT +enum MHD_Result SH_handler_config (struct SH_RequestHandler *rh, struct MHD_Connection *connection, void **connection_cls, diff --git a/src/sync/sync-httpd_mhd.c b/src/sync/sync-httpd_mhd.c @@ -27,7 +27,7 @@ #include "sync-httpd_mhd.h" -MHD_RESULT +enum MHD_Result SH_MHD_handler_static_response (struct SH_RequestHandler *rh, struct MHD_Connection *connection, void **connection_cls, @@ -47,7 +47,7 @@ SH_MHD_handler_static_response (struct SH_RequestHandler *rh, } -MHD_RESULT +enum MHD_Result SH_MHD_handler_agpl_redirect (struct SH_RequestHandler *rh, struct MHD_Connection *connection, void **connection_cls, diff --git a/src/sync/sync-httpd_mhd.h b/src/sync/sync-httpd_mhd.h @@ -39,7 +39,7 @@ * @param[in,out] upload_data_size number of bytes (left) in @a upload_data * @return MHD result code */ -MHD_RESULT +enum MHD_Result SH_MHD_handler_static_response (struct SH_RequestHandler *rh, struct MHD_Connection *connection, void **connection_cls, @@ -58,7 +58,7 @@ SH_MHD_handler_static_response (struct SH_RequestHandler *rh, * @param[in,out] upload_data_size number of bytes (left) in @a upload_data * @return MHD result code */ -MHD_RESULT +enum MHD_Result SH_MHD_handler_agpl_redirect (struct SH_RequestHandler *rh, struct MHD_Connection *connection, void **connection_cls,