exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 5e2ea92480df4b1887c027251f11a9b8fa767dbc
parent 2c8af8181c8c2daf671359ae809c88ca8e785d09
Author: Sebastian <sebasjm@gmail.com>
Date:   Mon, 10 Mar 2025 17:25:15 -0300

fix: broken build

removing gnunet_mhd_lib
rename GNUNET_MHD_ -> GNUNET_JSON_

Diffstat:
Msrc/bank-lib/Makefile.am | 1-
Msrc/bank-lib/fakebank_bank_post_accounts_token.c | 27+++++++++++++--------------
Msrc/bank-lib/fakebank_bank_post_accounts_withdrawals.c | 27+++++++++++++--------------
Msrc/bank-lib/fakebank_bank_post_withdrawals_id_op.c | 27+++++++++++++--------------
Msrc/bank-lib/fakebank_bank_testing_register.c | 27+++++++++++++--------------
Msrc/bank-lib/fakebank_tbi_post_withdrawal_operation.c | 27+++++++++++++--------------
Msrc/bank-lib/fakebank_twg_admin_add_incoming.c | 27+++++++++++++--------------
Msrc/bank-lib/fakebank_twg_admin_add_kycauth.c | 27+++++++++++++--------------
Msrc/bank-lib/fakebank_twg_transfer.c | 27+++++++++++++--------------
Msrc/mhd/Makefile.am | 1-
Msrc/mhd/mhd_parsing.c | 29++++++++++++++---------------
11 files changed, 118 insertions(+), 129 deletions(-)

diff --git a/src/bank-lib/Makefile.am b/src/bank-lib/Makefile.am @@ -51,7 +51,6 @@ libtalerbank_la_LIBADD = \ $(top_builddir)/src/util/libtalerutil.la \ -lgnunetcurl \ -lgnunetjson \ - -lgnunetmhd \ -lgnunetutil \ -ljansson \ -lcurl \ diff --git a/src/bank-lib/fakebank_bank_post_accounts_token.c b/src/bank-lib/fakebank_bank_post_accounts_token.c @@ -27,7 +27,6 @@ #include "taler_bank_service.h" #include "taler_mhd_lib.h" #include <gnunet/gnunet_mhd_compat.h> -#include <gnunet/gnunet_mhd_lib.h> #include "fakebank.h" #include "fakebank_bank_post_accounts_token.h" #include "fakebank_common_lookup.h" @@ -119,36 +118,36 @@ TALER_FAKEBANK_bank_post_accounts_token_ ( void **con_cls) { struct ConnectionContext *cc = *con_cls; - enum GNUNET_MHD_PostResult pr; + enum GNUNET_JSON_PostResult pr; json_t *json; MHD_RESULT res; if (NULL == cc) { cc = GNUNET_new (struct ConnectionContext); - cc->ctx_cleaner = &GNUNET_MHD_post_parser_cleanup; + cc->ctx_cleaner = &GNUNET_JSON_post_parser_cleanup; *con_cls = cc; } - pr = GNUNET_MHD_post_parser (REQUEST_BUFFER_MAX, - connection, - &cc->ctx, - upload_data, - upload_data_size, - &json); + pr = GNUNET_JSON_post_parser (REQUEST_BUFFER_MAX, + connection, + &cc->ctx, + upload_data, + upload_data_size, + &json); switch (pr) { - case GNUNET_MHD_PR_OUT_OF_MEMORY: + case GNUNET_JSON_PR_OUT_OF_MEMORY: GNUNET_break (0); return MHD_NO; - case GNUNET_MHD_PR_CONTINUE: + case GNUNET_JSON_PR_CONTINUE: return MHD_YES; - case GNUNET_MHD_PR_REQUEST_TOO_LARGE: + case GNUNET_JSON_PR_REQUEST_TOO_LARGE: GNUNET_break (0); return MHD_NO; - case GNUNET_MHD_PR_JSON_INVALID: + case GNUNET_JSON_PR_JSON_INVALID: GNUNET_break (0); return MHD_NO; - case GNUNET_MHD_PR_SUCCESS: + case GNUNET_JSON_PR_SUCCESS: break; } diff --git a/src/bank-lib/fakebank_bank_post_accounts_withdrawals.c b/src/bank-lib/fakebank_bank_post_accounts_withdrawals.c @@ -27,7 +27,6 @@ #include "taler_bank_service.h" #include "taler_mhd_lib.h" #include <gnunet/gnunet_mhd_compat.h> -#include <gnunet/gnunet_mhd_lib.h> #include "fakebank.h" #include "fakebank_bank_post_accounts_withdrawals.h" #include "fakebank_common_lookup.h" @@ -142,36 +141,36 @@ TALER_FAKEBANK_bank_post_account_withdrawals_ ( void **con_cls) { struct ConnectionContext *cc = *con_cls; - enum GNUNET_MHD_PostResult pr; + enum GNUNET_JSON_PostResult pr; json_t *json; MHD_RESULT res; if (NULL == cc) { cc = GNUNET_new (struct ConnectionContext); - cc->ctx_cleaner = &GNUNET_MHD_post_parser_cleanup; + cc->ctx_cleaner = &GNUNET_JSON_post_parser_cleanup; *con_cls = cc; } - pr = GNUNET_MHD_post_parser (REQUEST_BUFFER_MAX, - connection, - &cc->ctx, - upload_data, - upload_data_size, - &json); + pr = GNUNET_JSON_post_parser (REQUEST_BUFFER_MAX, + connection, + &cc->ctx, + upload_data, + upload_data_size, + &json); switch (pr) { - case GNUNET_MHD_PR_OUT_OF_MEMORY: + case GNUNET_JSON_PR_OUT_OF_MEMORY: GNUNET_break (0); return MHD_NO; - case GNUNET_MHD_PR_CONTINUE: + case GNUNET_JSON_PR_CONTINUE: return MHD_YES; - case GNUNET_MHD_PR_REQUEST_TOO_LARGE: + case GNUNET_JSON_PR_REQUEST_TOO_LARGE: GNUNET_break (0); return MHD_NO; - case GNUNET_MHD_PR_JSON_INVALID: + case GNUNET_JSON_PR_JSON_INVALID: GNUNET_break (0); return MHD_NO; - case GNUNET_MHD_PR_SUCCESS: + case GNUNET_JSON_PR_SUCCESS: break; } diff --git a/src/bank-lib/fakebank_bank_post_withdrawals_id_op.c b/src/bank-lib/fakebank_bank_post_withdrawals_id_op.c @@ -27,7 +27,6 @@ #include "taler_bank_service.h" #include "taler_mhd_lib.h" #include <gnunet/gnunet_mhd_compat.h> -#include <gnunet/gnunet_mhd_lib.h> #include "fakebank.h" #include "fakebank_bank_post_withdrawals_id_op.h" #include "fakebank_common_lookup.h" @@ -277,33 +276,33 @@ TALER_FAKEBANK_bank_withdrawals_id_op_ ( if (NULL == cc) { cc = GNUNET_new (struct ConnectionContext); - cc->ctx_cleaner = &GNUNET_MHD_post_parser_cleanup; + cc->ctx_cleaner = &GNUNET_JSON_post_parser_cleanup; *con_cls = cc; } if (0 != *upload_data_size) { - enum GNUNET_MHD_PostResult pr; + enum GNUNET_JSON_PostResult pr; - pr = GNUNET_MHD_post_parser (REQUEST_BUFFER_MAX, - connection, - &cc->ctx, - upload_data, - upload_data_size, - &json); + pr = GNUNET_JSON_post_parser (REQUEST_BUFFER_MAX, + connection, + &cc->ctx, + upload_data, + upload_data_size, + &json); switch (pr) { - case GNUNET_MHD_PR_OUT_OF_MEMORY: + case GNUNET_JSON_PR_OUT_OF_MEMORY: GNUNET_break (0); return MHD_NO; - case GNUNET_MHD_PR_CONTINUE: + case GNUNET_JSON_PR_CONTINUE: return MHD_YES; - case GNUNET_MHD_PR_REQUEST_TOO_LARGE: + case GNUNET_JSON_PR_REQUEST_TOO_LARGE: GNUNET_break (0); return MHD_NO; - case GNUNET_MHD_PR_JSON_INVALID: + case GNUNET_JSON_PR_JSON_INVALID: GNUNET_break (0); return MHD_NO; - case GNUNET_MHD_PR_SUCCESS: + case GNUNET_JSON_PR_SUCCESS: break; } } diff --git a/src/bank-lib/fakebank_bank_testing_register.c b/src/bank-lib/fakebank_bank_testing_register.c @@ -26,7 +26,6 @@ #include "taler_bank_service.h" #include "taler_mhd_lib.h" #include <gnunet/gnunet_mhd_compat.h> -#include <gnunet/gnunet_mhd_lib.h> #include "fakebank.h" #include "fakebank_bank_testing_register.h" @@ -40,36 +39,36 @@ TALER_FAKEBANK_bank_testing_register_ ( void **con_cls) { struct ConnectionContext *cc = *con_cls; - enum GNUNET_MHD_PostResult pr; + enum GNUNET_JSON_PostResult pr; json_t *json; MHD_RESULT res; if (NULL == cc) { cc = GNUNET_new (struct ConnectionContext); - cc->ctx_cleaner = &GNUNET_MHD_post_parser_cleanup; + cc->ctx_cleaner = &GNUNET_JSON_post_parser_cleanup; *con_cls = cc; } - pr = GNUNET_MHD_post_parser (REQUEST_BUFFER_MAX, - connection, - &cc->ctx, - upload_data, - upload_data_size, - &json); + pr = GNUNET_JSON_post_parser (REQUEST_BUFFER_MAX, + connection, + &cc->ctx, + upload_data, + upload_data_size, + &json); switch (pr) { - case GNUNET_MHD_PR_OUT_OF_MEMORY: + case GNUNET_JSON_PR_OUT_OF_MEMORY: GNUNET_break (0); return MHD_NO; - case GNUNET_MHD_PR_CONTINUE: + case GNUNET_JSON_PR_CONTINUE: return MHD_YES; - case GNUNET_MHD_PR_REQUEST_TOO_LARGE: + case GNUNET_JSON_PR_REQUEST_TOO_LARGE: GNUNET_break (0); return MHD_NO; - case GNUNET_MHD_PR_JSON_INVALID: + case GNUNET_JSON_PR_JSON_INVALID: GNUNET_break (0); return MHD_NO; - case GNUNET_MHD_PR_SUCCESS: + case GNUNET_JSON_PR_SUCCESS: break; } diff --git a/src/bank-lib/fakebank_tbi_post_withdrawal_operation.c b/src/bank-lib/fakebank_tbi_post_withdrawal_operation.c @@ -27,7 +27,6 @@ #include "taler_bank_service.h" #include "taler_mhd_lib.h" #include <gnunet/gnunet_mhd_compat.h> -#include <gnunet/gnunet_mhd_lib.h> #include "fakebank.h" #include "fakebank_common_lookup.h" #include "fakebank_tbi_post_withdrawal_operation.h" @@ -206,36 +205,36 @@ TALER_FAKEBANK_tbi_post_withdrawal ( void **con_cls) { struct ConnectionContext *cc = *con_cls; - enum GNUNET_MHD_PostResult pr; + enum GNUNET_JSON_PostResult pr; json_t *json; MHD_RESULT res; if (NULL == cc) { cc = GNUNET_new (struct ConnectionContext); - cc->ctx_cleaner = &GNUNET_MHD_post_parser_cleanup; + cc->ctx_cleaner = &GNUNET_JSON_post_parser_cleanup; *con_cls = cc; } - pr = GNUNET_MHD_post_parser (REQUEST_BUFFER_MAX, - connection, - &cc->ctx, - upload_data, - upload_data_size, - &json); + pr = GNUNET_JSON_post_parser (REQUEST_BUFFER_MAX, + connection, + &cc->ctx, + upload_data, + upload_data_size, + &json); switch (pr) { - case GNUNET_MHD_PR_OUT_OF_MEMORY: + case GNUNET_JSON_PR_OUT_OF_MEMORY: GNUNET_break (0); return MHD_NO; - case GNUNET_MHD_PR_CONTINUE: + case GNUNET_JSON_PR_CONTINUE: return MHD_YES; - case GNUNET_MHD_PR_REQUEST_TOO_LARGE: + case GNUNET_JSON_PR_REQUEST_TOO_LARGE: GNUNET_break (0); return MHD_NO; - case GNUNET_MHD_PR_JSON_INVALID: + case GNUNET_JSON_PR_JSON_INVALID: GNUNET_break (0); return MHD_NO; - case GNUNET_MHD_PR_SUCCESS: + case GNUNET_JSON_PR_SUCCESS: break; } diff --git a/src/bank-lib/fakebank_twg_admin_add_incoming.c b/src/bank-lib/fakebank_twg_admin_add_incoming.c @@ -26,7 +26,6 @@ #include "taler_bank_service.h" #include "taler_mhd_lib.h" #include <gnunet/gnunet_mhd_compat.h> -#include <gnunet/gnunet_mhd_lib.h> #include "fakebank.h" #include "fakebank_common_make_admin_transfer.h" #include "fakebank_twg_admin_add_incoming.h" @@ -41,7 +40,7 @@ TALER_FAKEBANK_twg_admin_add_incoming_ ( void **con_cls) { struct ConnectionContext *cc = *con_cls; - enum GNUNET_MHD_PostResult pr; + enum GNUNET_JSON_PostResult pr; json_t *json; uint64_t row_id; struct GNUNET_TIME_Timestamp timestamp; @@ -49,29 +48,29 @@ TALER_FAKEBANK_twg_admin_add_incoming_ ( if (NULL == cc) { cc = GNUNET_new (struct ConnectionContext); - cc->ctx_cleaner = &GNUNET_MHD_post_parser_cleanup; + cc->ctx_cleaner = &GNUNET_JSON_post_parser_cleanup; *con_cls = cc; } - pr = GNUNET_MHD_post_parser (REQUEST_BUFFER_MAX, - connection, - &cc->ctx, - upload_data, - upload_data_size, - &json); + pr = GNUNET_JSON_post_parser (REQUEST_BUFFER_MAX, + connection, + &cc->ctx, + upload_data, + upload_data_size, + &json); switch (pr) { - case GNUNET_MHD_PR_OUT_OF_MEMORY: + case GNUNET_JSON_PR_OUT_OF_MEMORY: GNUNET_break (0); return MHD_NO; - case GNUNET_MHD_PR_CONTINUE: + case GNUNET_JSON_PR_CONTINUE: return MHD_YES; - case GNUNET_MHD_PR_REQUEST_TOO_LARGE: + case GNUNET_JSON_PR_REQUEST_TOO_LARGE: GNUNET_break (0); return MHD_NO; - case GNUNET_MHD_PR_JSON_INVALID: + case GNUNET_JSON_PR_JSON_INVALID: GNUNET_break (0); return MHD_NO; - case GNUNET_MHD_PR_SUCCESS: + case GNUNET_JSON_PR_SUCCESS: break; } { diff --git a/src/bank-lib/fakebank_twg_admin_add_kycauth.c b/src/bank-lib/fakebank_twg_admin_add_kycauth.c @@ -26,7 +26,6 @@ #include "taler_bank_service.h" #include "taler_mhd_lib.h" #include <gnunet/gnunet_mhd_compat.h> -#include <gnunet/gnunet_mhd_lib.h> #include "fakebank.h" #include "fakebank_common_make_admin_transfer.h" #include "fakebank_twg_admin_add_kycauth.h" @@ -42,7 +41,7 @@ TALER_FAKEBANK_twg_admin_add_kycauth_ ( void **con_cls) { struct ConnectionContext *cc = *con_cls; - enum GNUNET_MHD_PostResult pr; + enum GNUNET_JSON_PostResult pr; json_t *json; uint64_t row_id; struct GNUNET_TIME_Timestamp timestamp; @@ -50,29 +49,29 @@ TALER_FAKEBANK_twg_admin_add_kycauth_ ( if (NULL == cc) { cc = GNUNET_new (struct ConnectionContext); - cc->ctx_cleaner = &GNUNET_MHD_post_parser_cleanup; + cc->ctx_cleaner = &GNUNET_JSON_post_parser_cleanup; *con_cls = cc; } - pr = GNUNET_MHD_post_parser (REQUEST_BUFFER_MAX, - connection, - &cc->ctx, - upload_data, - upload_data_size, - &json); + pr = GNUNET_JSON_post_parser (REQUEST_BUFFER_MAX, + connection, + &cc->ctx, + upload_data, + upload_data_size, + &json); switch (pr) { - case GNUNET_MHD_PR_OUT_OF_MEMORY: + case GNUNET_JSON_PR_OUT_OF_MEMORY: GNUNET_break (0); return MHD_NO; - case GNUNET_MHD_PR_CONTINUE: + case GNUNET_JSON_PR_CONTINUE: return MHD_YES; - case GNUNET_MHD_PR_REQUEST_TOO_LARGE: + case GNUNET_JSON_PR_REQUEST_TOO_LARGE: GNUNET_break (0); return MHD_NO; - case GNUNET_MHD_PR_JSON_INVALID: + case GNUNET_JSON_PR_JSON_INVALID: GNUNET_break (0); return MHD_NO; - case GNUNET_MHD_PR_SUCCESS: + case GNUNET_JSON_PR_SUCCESS: break; } { diff --git a/src/bank-lib/fakebank_twg_transfer.c b/src/bank-lib/fakebank_twg_transfer.c @@ -26,7 +26,6 @@ #include "taler_bank_service.h" #include "taler_mhd_lib.h" #include <gnunet/gnunet_mhd_compat.h> -#include <gnunet/gnunet_mhd_lib.h> #include "fakebank.h" #include "fakebank_common_transact.h" #include "fakebank_twg_transfer.h" @@ -53,7 +52,7 @@ TALER_FAKEBANK_handle_transfer_ ( void **con_cls) { struct ConnectionContext *cc = *con_cls; - enum GNUNET_MHD_PostResult pr; + enum GNUNET_JSON_PostResult pr; json_t *json; uint64_t row_id; struct GNUNET_TIME_Timestamp ts; @@ -61,29 +60,29 @@ TALER_FAKEBANK_handle_transfer_ ( if (NULL == cc) { cc = GNUNET_new (struct ConnectionContext); - cc->ctx_cleaner = &GNUNET_MHD_post_parser_cleanup; + cc->ctx_cleaner = &GNUNET_JSON_post_parser_cleanup; *con_cls = cc; } - pr = GNUNET_MHD_post_parser (REQUEST_BUFFER_MAX, - connection, - &cc->ctx, - upload_data, - upload_data_size, - &json); + pr = GNUNET_JSON_post_parser (REQUEST_BUFFER_MAX, + connection, + &cc->ctx, + upload_data, + upload_data_size, + &json); switch (pr) { - case GNUNET_MHD_PR_OUT_OF_MEMORY: + case GNUNET_JSON_PR_OUT_OF_MEMORY: GNUNET_break (0); return MHD_NO; - case GNUNET_MHD_PR_CONTINUE: + case GNUNET_JSON_PR_CONTINUE: return MHD_YES; - case GNUNET_MHD_PR_REQUEST_TOO_LARGE: + case GNUNET_JSON_PR_REQUEST_TOO_LARGE: GNUNET_break (0); return MHD_NO; - case GNUNET_MHD_PR_JSON_INVALID: + case GNUNET_JSON_PR_JSON_INVALID: GNUNET_break (0); return MHD_NO; - case GNUNET_MHD_PR_SUCCESS: + case GNUNET_JSON_PR_SUCCESS: break; } { diff --git a/src/mhd/Makefile.am b/src/mhd/Makefile.am @@ -24,7 +24,6 @@ libtalermhd_la_LIBADD = \ $(top_builddir)/src/json/libtalerjson.la \ $(top_builddir)/src/util/libtalerutil.la \ -lgnunetjson \ - -lgnunetmhd \ -lgnunetutil \ -lmicrohttpd \ -ljansson \ diff --git a/src/mhd/mhd_parsing.c b/src/mhd/mhd_parsing.c @@ -23,7 +23,6 @@ #include "platform.h" #include <gnunet/gnunet_util_lib.h> #include <gnunet/gnunet_json_lib.h> -#include <gnunet/gnunet_mhd_lib.h> #include "taler_json_lib.h" #include "taler_mhd_lib.h" @@ -35,17 +34,17 @@ TALER_MHD_parse_post_json (struct MHD_Connection *connection, size_t *upload_data_size, json_t **json) { - enum GNUNET_MHD_PostResult pr; - - pr = GNUNET_MHD_post_parser (TALER_MHD_REQUEST_BUFFER_MAX, - connection, - con_cls, - upload_data, - upload_data_size, - json); + enum GNUNET_JSON_PostResult pr; + + pr = GNUNET_JSON_post_parser (TALER_MHD_REQUEST_BUFFER_MAX, + connection, + con_cls, + upload_data, + upload_data_size, + json); switch (pr) { - case GNUNET_MHD_PR_OUT_OF_MEMORY: + case GNUNET_JSON_PR_OUT_OF_MEMORY: GNUNET_break (NULL == *json); return (MHD_NO == TALER_MHD_reply_with_error ( @@ -54,15 +53,15 @@ TALER_MHD_parse_post_json (struct MHD_Connection *connection, TALER_EC_GENERIC_PARSER_OUT_OF_MEMORY, NULL)) ? GNUNET_SYSERR : GNUNET_NO; - case GNUNET_MHD_PR_CONTINUE: + case GNUNET_JSON_PR_CONTINUE: GNUNET_break (NULL == *json); return GNUNET_YES; - case GNUNET_MHD_PR_REQUEST_TOO_LARGE: + case GNUNET_JSON_PR_REQUEST_TOO_LARGE: GNUNET_break (NULL == *json); GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Closing connection, upload too large\n"); return GNUNET_SYSERR; - case GNUNET_MHD_PR_JSON_INVALID: + case GNUNET_JSON_PR_JSON_INVALID: GNUNET_break (NULL == *json); return (MHD_YES == TALER_MHD_reply_with_error (connection, @@ -70,7 +69,7 @@ TALER_MHD_parse_post_json (struct MHD_Connection *connection, TALER_EC_GENERIC_JSON_INVALID, NULL)) ? GNUNET_NO : GNUNET_SYSERR; - case GNUNET_MHD_PR_SUCCESS: + case GNUNET_JSON_PR_SUCCESS: GNUNET_break (NULL != *json); return GNUNET_YES; } @@ -83,7 +82,7 @@ TALER_MHD_parse_post_json (struct MHD_Connection *connection, void TALER_MHD_parse_post_cleanup_callback (void *con_cls) { - GNUNET_MHD_post_parser_cleanup (con_cls); + GNUNET_JSON_post_parser_cleanup (con_cls); }