diff options
author | Cedric Zwahlen <cedric.zwahlen@students.bfh.ch> | 2024-04-26 13:39:41 +0200 |
---|---|---|
committer | Cedric Zwahlen <cedric.zwahlen@students.bfh.ch> | 2024-04-26 13:39:41 +0200 |
commit | ebbf8f37ac3a15653c869d5d06173e8e9aa80ac7 (patch) | |
tree | fe80c2f3a2a7b25fbb572ac514cac97f2b0b0316 | |
parent | 3c8c43e0cae2bd3c151112e55ff7231e16809abe (diff) | |
download | exchange-ebbf8f37ac3a15653c869d5d06173e8e9aa80ac7.tar.gz exchange-ebbf8f37ac3a15653c869d5d06173e8e9aa80ac7.tar.bz2 exchange-ebbf8f37ac3a15653c869d5d06173e8e9aa80ac7.zip |
fix some bugs
17 files changed, 129 insertions, 449 deletions
diff --git a/src/auditor/taler-auditor-httpd_exchange-signkeys-get.c b/src/auditor/taler-auditor-httpd_exchange-signkeys-get.c index 003f33d08..06b606a31 100644 --- a/src/auditor/taler-auditor-httpd_exchange-signkeys-get.c +++ b/src/auditor/taler-auditor-httpd_exchange-signkeys-get.c @@ -118,40 +118,12 @@ TAH_EXCHANGE_SIGNKEYS_handler_get (struct TAH_RequestHandler *rh, &offset); bool return_suppressed = false; - - struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_bool ("return_suppressed", &return_suppressed), - GNUNET_JSON_spec_end () - }; - - // read the input json - json_t *json_in; + const char *ret_s = MHD_lookup_connection_value (connection, + MHD_GET_ARGUMENT_KIND, + "return_suppressed"); + if (ret_s != NULL && strcmp (ret_s, "true") == 0) { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json_in); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json_in)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json_in, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json_in); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json_in); - return MHD_YES; /* failure */ - } + return_suppressed = true; } qs = TAH_plugin->get_exchange_signkeys ( diff --git a/src/auditor/taler-auditor-httpd_fee-time-inconsistency-get.c b/src/auditor/taler-auditor-httpd_fee-time-inconsistency-get.c index e0a368035..e4e679b1f 100644 --- a/src/auditor/taler-auditor-httpd_fee-time-inconsistency-get.c +++ b/src/auditor/taler-auditor-httpd_fee-time-inconsistency-get.c @@ -100,57 +100,29 @@ TAH_FEE_TIME_INCONSISTENCY_handler_get (struct TAH_RequestHandler *rh, ja = json_array (); GNUNET_break (NULL != ja); - int64_t limit = -20; - uint64_t offset; - - TALER_MHD_parse_request_snumber (connection, - "limit", - &limit); - - if (limit < 0) - offset = INT64_MAX; - else - offset = 0; - - TALER_MHD_parse_request_number (connection, - "offset", - &offset); - - bool return_suppressed = false; - - struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_bool ("return_suppressed", &return_suppressed), - GNUNET_JSON_spec_end () - }; - - // read the input json - json_t *json_in; + int64_t limit = -20; + uint64_t offset; + + TALER_MHD_parse_request_snumber (connection, + "limit", + &limit); + + if (limit < 0) + offset = INT64_MAX; + else + offset = 0; + + TALER_MHD_parse_request_number (connection, + "offset", + &offset); + + bool return_suppressed = false; + const char *ret_s = MHD_lookup_connection_value (connection, + MHD_GET_ARGUMENT_KIND, + "return_suppressed"); + if (ret_s != NULL && strcmp (ret_s, "true") == 0) { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json_in); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json_in)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json_in, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json_in); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json_in); - return MHD_YES; /* failure */ - } + return_suppressed = true; } qs = TAH_plugin->get_fee_time_inconsistency ( diff --git a/src/auditor/taler-auditor-httpd_historic-denomination-revenue-get.c b/src/auditor/taler-auditor-httpd_historic-denomination-revenue-get.c index ff9f7b71e..acb9535d4 100644 --- a/src/auditor/taler-auditor-httpd_historic-denomination-revenue-get.c +++ b/src/auditor/taler-auditor-httpd_historic-denomination-revenue-get.c @@ -117,40 +117,12 @@ TAH_HISTORIC_DENOMINATION_REVENUE_handler_get (struct TAH_RequestHandler *rh, &offset); bool return_suppressed = false; - - struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_bool ("return_suppressed", &return_suppressed), - GNUNET_JSON_spec_end () - }; - - // read the input json - json_t *json_in; + const char *ret_s = MHD_lookup_connection_value (connection, + MHD_GET_ARGUMENT_KIND, + "return_suppressed"); + if (ret_s != NULL && strcmp (ret_s, "true") == 0) { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json_in); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json_in)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json_in, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json_in); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json_in); - return MHD_YES; /* failure */ - } + return_suppressed = true; } qs = TAH_plugin->get_historic_denomination_revenue ( diff --git a/src/auditor/taler-auditor-httpd_historic-reserve-summary-get.c b/src/auditor/taler-auditor-httpd_historic-reserve-summary-get.c index b58c5f3cb..2270d4e17 100644 --- a/src/auditor/taler-auditor-httpd_historic-reserve-summary-get.c +++ b/src/auditor/taler-auditor-httpd_historic-reserve-summary-get.c @@ -116,40 +116,12 @@ TAH_HISTORIC_RESERVE_SUMMARY_handler_get (struct TAH_RequestHandler *rh, &offset); bool return_suppressed = false; - - struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_bool ("return_suppressed", &return_suppressed), - GNUNET_JSON_spec_end () - }; - - // read the input json - json_t *json_in; + const char *ret_s = MHD_lookup_connection_value (connection, + MHD_GET_ARGUMENT_KIND, + "return_suppressed"); + if (ret_s != NULL && strcmp (ret_s, "true") == 0) { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json_in); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json_in)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json_in, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json_in); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json_in); - return MHD_YES; /* failure */ - } + return_suppressed = true; } qs = TAH_plugin->get_historic_reserve_summary ( diff --git a/src/auditor/taler-auditor-httpd_misattribution-in-inconsistency-get.c b/src/auditor/taler-auditor-httpd_misattribution-in-inconsistency-get.c index a282721ce..f10291bc7 100644 --- a/src/auditor/taler-auditor-httpd_misattribution-in-inconsistency-get.c +++ b/src/auditor/taler-auditor-httpd_misattribution-in-inconsistency-get.c @@ -117,40 +117,12 @@ TAH_MISATTRIBUTION_IN_INCONSISTENCY_handler_get (struct TAH_RequestHandler *rh, &offset); bool return_suppressed = false; - - struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_bool ("return_suppressed", &return_suppressed), - GNUNET_JSON_spec_end () - }; - - // read the input json - json_t *json_in; + const char *ret_s = MHD_lookup_connection_value (connection, + MHD_GET_ARGUMENT_KIND, + "return_suppressed"); + if (ret_s != NULL && strcmp (ret_s, "true") == 0) { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json_in); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json_in)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json_in, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json_in); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json_in); - return MHD_YES; /* failure */ - } + return_suppressed = true; } qs = TAH_plugin->get_misattribution_in_inconsistency ( diff --git a/src/auditor/taler-auditor-httpd_progress-get.c b/src/auditor/taler-auditor-httpd_progress-get.c index 2ebc8976b..678cfa802 100644 --- a/src/auditor/taler-auditor-httpd_progress-get.c +++ b/src/auditor/taler-auditor-httpd_progress-get.c @@ -96,58 +96,29 @@ TAH_PROGRESS_handler_get (struct TAH_RequestHandler *rh, ja = json_array (); GNUNET_break (NULL != ja); - int64_t limit = -20; - uint64_t offset; - - TALER_MHD_parse_request_snumber (connection, - "limit", - &limit); - - if (limit < 0) - offset = INT64_MAX; - else - offset = 0; - - TALER_MHD_parse_request_number (connection, - "offset", - &offset); - - bool return_suppressed = false; - - struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_bool ("return_suppressed", &return_suppressed), - GNUNET_JSON_spec_end () - }; - - - // read the input json - json_t *json_in; + int64_t limit = -20; + uint64_t offset; + + TALER_MHD_parse_request_snumber (connection, + "limit", + &limit); + + if (limit < 0) + offset = INT64_MAX; + else + offset = 0; + + TALER_MHD_parse_request_number (connection, + "offset", + &offset); + + bool return_suppressed = false; + const char *ret_s = MHD_lookup_connection_value (connection, + MHD_GET_ARGUMENT_KIND, + "return_suppressed"); + if (ret_s != NULL && strcmp (ret_s, "true") == 0) { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json_in); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json_in)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json_in, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json_in); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json_in); - return MHD_YES; /* failure */ - } + return_suppressed = true; } qs = TAH_plugin->get_progress ( diff --git a/src/auditor/taler-auditor-httpd_purses-get.c b/src/auditor/taler-auditor-httpd_purses-get.c index 2ce236fc4..81b5e16a7 100644 --- a/src/auditor/taler-auditor-httpd_purses-get.c +++ b/src/auditor/taler-auditor-httpd_purses-get.c @@ -118,40 +118,12 @@ TAH_PURSES_handler_get (struct TAH_RequestHandler *rh, &offset); bool return_suppressed = false; - - struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_bool ("return_suppressed", &return_suppressed), - GNUNET_JSON_spec_end () - }; - - // read the input json - json_t *json_in; + const char *ret_s = MHD_lookup_connection_value (connection, + MHD_GET_ARGUMENT_KIND, + "return_suppressed"); + if (ret_s != NULL && strcmp (ret_s, "true") == 0) { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json_in); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json_in)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json_in, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json_in); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json_in); - return MHD_YES; /* failure */ - } + return_suppressed = true; } qs = TAH_plugin->get_purses ( diff --git a/src/auditor/taler-auditor-httpd_refreshes-hanging-get.c b/src/auditor/taler-auditor-httpd_refreshes-hanging-get.c index d8654d2c8..b79cf20ca 100644 --- a/src/auditor/taler-auditor-httpd_refreshes-hanging-get.c +++ b/src/auditor/taler-auditor-httpd_refreshes-hanging-get.c @@ -99,58 +99,29 @@ TAH_REFRESHES_HANGING_handler_get (struct TAH_RequestHandler *rh, ja = json_array (); GNUNET_break (NULL != ja); - int64_t limit = -20; - uint64_t offset; - - TALER_MHD_parse_request_snumber (connection, - "limit", - &limit); - - if (limit < 0) - offset = INT64_MAX; - else - offset = 0; - - TALER_MHD_parse_request_number (connection, - "offset", - &offset); - - bool return_suppressed = false; - - struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_bool ("return_suppressed", &return_suppressed), - GNUNET_JSON_spec_end () - }; - - - // read the input json - json_t *json_in; + int64_t limit = -20; + uint64_t offset; + + TALER_MHD_parse_request_snumber (connection, + "limit", + &limit); + + if (limit < 0) + offset = INT64_MAX; + else + offset = 0; + + TALER_MHD_parse_request_number (connection, + "offset", + &offset); + + bool return_suppressed = false; + const char *ret_s = MHD_lookup_connection_value (connection, + MHD_GET_ARGUMENT_KIND, + "return_suppressed"); + if (ret_s != NULL && strcmp (ret_s, "true") == 0) { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json_in); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json_in)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json_in, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json_in); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json_in); - return MHD_YES; /* failure */ - } + return_suppressed = true; } qs = TAH_plugin->get_refreshes_hanging ( diff --git a/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-get.c b/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-get.c index 859331f66..7dc9eb57d 100644 --- a/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-get.c +++ b/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-get.c @@ -127,43 +127,13 @@ TAH_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_handler_get (struct &offset); bool return_suppressed = false; - - struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_bool ("return_suppressed", &return_suppressed), - GNUNET_JSON_spec_end () - }; - - - // read the input json - json_t *json_in; + const char *ret_s = MHD_lookup_connection_value (connection, + MHD_GET_ARGUMENT_KIND, + "return_suppressed"); + if (ret_s != NULL && strcmp (ret_s, "true") == 0) { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json_in); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json_in)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json_in, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json_in); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json_in); - return MHD_YES; /* failure */ - } + return_suppressed = true; } - qs = TAH_plugin->get_reserve_balance_insufficient_inconsistency ( TAH_plugin->cls, limit, diff --git a/src/auditor/taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-get.c b/src/auditor/taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-get.c index c30524419..9b746e9fb 100644 --- a/src/auditor/taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-get.c +++ b/src/auditor/taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-get.c @@ -124,40 +124,13 @@ TAH_RESERVE_BALANCE_SUMMARY_WRONG_INCONSISTENCY_handler_get (struct &offset); bool return_suppressed = false; + const char *ret_s = MHD_lookup_connection_value (connection, + MHD_GET_ARGUMENT_KIND, + "return_suppressed"); - struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_bool ("return_suppressed", &return_suppressed), - GNUNET_JSON_spec_end () - }; - - // read the input json - json_t *json_in; + if (ret_s != NULL && strcmp (ret_s, "true") == 0) { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json_in); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json_in)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json_in, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json_in); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json_in); - return MHD_YES; /* failure */ - } + return_suppressed = true; } qs = TAH_plugin->get_reserve_balance_summary_wrong_inconsistency ( diff --git a/src/auditor/taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-put.c b/src/auditor/taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-put.c index 7cd7c31a7..231daf569 100644 --- a/src/auditor/taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-put.c +++ b/src/auditor/taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-put.c @@ -93,7 +93,6 @@ TAH_RESERVE_BALANCE_SUMMARY_WRONG_INCONSISTENCY_handler_put ( TALER_JSON_spec_amount ("exchange_amount", TAH_currency, &dc.exchange_amount), TALER_JSON_spec_amount ("auditor_amount", TAH_currency, &dc.auditor_amount), - GNUNET_JSON_spec_bool ("suppressed", &dc.suppressed), GNUNET_JSON_spec_end () diff --git a/src/auditor/taler-auditor-httpd_reserve-in-inconsistency-get.c b/src/auditor/taler-auditor-httpd_reserve-in-inconsistency-get.c index b691a4446..2131ebc41 100644 --- a/src/auditor/taler-auditor-httpd_reserve-in-inconsistency-get.c +++ b/src/auditor/taler-auditor-httpd_reserve-in-inconsistency-get.c @@ -121,40 +121,12 @@ TAH_RESERVE_IN_INCONSISTENCY_handler_get (struct TAH_RequestHandler *rh, &offset); bool return_suppressed = false; - - struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_bool ("return_suppressed", &return_suppressed), - GNUNET_JSON_spec_end () - }; - - // read the input json - json_t *json_in; + const char *ret_s = MHD_lookup_connection_value (connection, + MHD_GET_ARGUMENT_KIND, + "return_suppressed"); + if (ret_s != NULL && strcmp (ret_s, "true") == 0) { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json_in); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json_in)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json_in, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json_in); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json_in); - return MHD_YES; /* failure */ - } + return_suppressed = true; } qs = TAH_plugin->get_reserve_in_inconsistency ( diff --git a/src/auditor/taler-auditor-httpd_reserve-in-inconsistency-put.c b/src/auditor/taler-auditor-httpd_reserve-in-inconsistency-put.c index dd1765b45..02f93a81b 100644 --- a/src/auditor/taler-auditor-httpd_reserve-in-inconsistency-put.c +++ b/src/auditor/taler-auditor-httpd_reserve-in-inconsistency-put.c @@ -88,7 +88,6 @@ TAH_RESERVE_IN_INCONSISTENCY_handler_put ( struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_int64 ("row_id", dc.row_id), TALER_JSON_spec_amount ("amount_exchange_expected", TAH_currency, &dc.amount_exchange_expected), TALER_JSON_spec_amount ("amount_wired", TAH_currency, &dc.amount_wired), @@ -96,7 +95,6 @@ TAH_RESERVE_IN_INCONSISTENCY_handler_put ( GNUNET_JSON_spec_int64 ("timestamp", &dc.timestamp), GNUNET_JSON_spec_fixed_auto ("account", &dc.account), GNUNET_JSON_spec_fixed_auto ("diagnostic", &dc.diagnostic), - GNUNET_JSON_spec_bool ("suppressed", &dc.suppressed), GNUNET_JSON_spec_end () diff --git a/src/auditor/taler-auditor-httpd_row-inconsistency-get.c b/src/auditor/taler-auditor-httpd_row-inconsistency-get.c index f2c70a843..9826c0dd3 100644 --- a/src/auditor/taler-auditor-httpd_row-inconsistency-get.c +++ b/src/auditor/taler-auditor-httpd_row-inconsistency-get.c @@ -31,8 +31,6 @@ add_row_inconsistency (void *cls, json_t *list = cls; json_t *obj; - printf ("checkpoint pg_3\n"); - obj = GNUNET_JSON_PACK ( // TODO: is it string? GNUNET_JSON_pack_string ("row_table", @@ -44,8 +42,6 @@ add_row_inconsistency (void *cls, json_array_append_new (list, obj)); - printf ("checkpoint pg_4\n"); - return GNUNET_OK; } @@ -87,28 +83,28 @@ TAH_ROW_INCONSISTENCY_handler_get (struct TAH_RequestHandler *rh, ja = json_array (); GNUNET_break (NULL != ja); - int64_t limit = -20; - uint64_t offset; + int64_t limit = -20; + uint64_t offset; - TALER_MHD_parse_request_snumber (connection, - "limit", - &limit); + TALER_MHD_parse_request_snumber (connection, + "limit", + &limit); - if (limit < 0) - offset = INT64_MAX; - else - offset = 0; + if (limit < 0) + offset = INT64_MAX; + else + offset = 0; - TALER_MHD_parse_request_number (connection, - "offset", - &offset); + TALER_MHD_parse_request_number (connection, + "offset", + &offset); - bool return_suppressed = false; + bool return_suppressed = false; - struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_bool ("return_suppressed", &return_suppressed), - GNUNET_JSON_spec_end () - }; + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_bool ("return_suppressed", &return_suppressed), + GNUNET_JSON_spec_end () + }; // read the input json diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh index 31d26f213..821da277b 100755 --- a/src/auditor/test-auditor.sh +++ b/src/auditor/test-auditor.sh @@ -542,8 +542,8 @@ function test_0() { echo "PASS" # cannot easily undo aggregator, hence full reload - full_reload - + # full_reload +cleanup } diff --git a/src/auditordb/pg_get_reserve_balance_summary_wrong_inconsistency.c b/src/auditordb/pg_get_reserve_balance_summary_wrong_inconsistency.c index a2ae412f0..72c169a56 100644 --- a/src/auditordb/pg_get_reserve_balance_summary_wrong_inconsistency.c +++ b/src/auditordb/pg_get_reserve_balance_summary_wrong_inconsistency.c @@ -72,10 +72,11 @@ reserve_balance_summary_wrong_inconsistency_cb (void *cls, struct TALER_AUDITORDB_ReserveBalanceSummaryWrongInconsistency dc; + bool isNull = false; + struct GNUNET_PQ_ResultSpec rs[] = { GNUNET_PQ_result_spec_uint64 ("row_id", &serial_id), - GNUNET_PQ_result_spec_auto_from_type ("reserve_pub", &dc.reserve_pub), TALER_PQ_RESULT_SPEC_AMOUNT ("exchange_amount", &dc.exchange_amount), TALER_PQ_RESULT_SPEC_AMOUNT ("auditor_amount", &dc.auditor_amount), diff --git a/src/auditordb/pg_insert_reserve_balance_summary_wrong_inconsistency.c b/src/auditordb/pg_insert_reserve_balance_summary_wrong_inconsistency.c index 0e9d7036a..70ec0eb87 100644 --- a/src/auditordb/pg_insert_reserve_balance_summary_wrong_inconsistency.c +++ b/src/auditordb/pg_insert_reserve_balance_summary_wrong_inconsistency.c @@ -32,8 +32,6 @@ TAH_PG_insert_reserve_balance_summary_wrong_inconsistency ( GNUNET_PQ_query_param_auto_from_type (&dc->reserve_pub), TALER_PQ_query_param_amount (pg->conn, &dc->exchange_amount), TALER_PQ_query_param_amount (pg->conn, &dc->auditor_amount), - GNUNET_PQ_query_param_bool (dc->suppressed), - GNUNET_PQ_query_param_end }; @@ -43,9 +41,8 @@ TAH_PG_insert_reserve_balance_summary_wrong_inconsistency ( "INSERT INTO auditor_reserve_balance_summary_wrong_inconsistency " "( reserve_pub," " exchange_amount," - " auditor_amount," - " suppressed" - ") VALUES ($1,$2,$3,$4);" + " auditor_amount" + ") VALUES ($1,$2,$3);" ); return GNUNET_PQ_eval_prepared_non_select (pg->conn, "auditor_reserve_balance_summary_wrong_inconsistency_insert", |