diff options
author | Nic Eigel <nic@eigel.ch> | 2024-04-26 16:44:26 +0200 |
---|---|---|
committer | Nic Eigel <nic@eigel.ch> | 2024-04-26 16:44:26 +0200 |
commit | 162f1a0825d685d1e2d91a908a6005cbe5cbf524 (patch) | |
tree | 5deb3768bdaceec1c243fc4db3b51ab937183309 /src/auditor/taler-auditor-httpd_fee-time-inconsistency-get.c | |
parent | df3aada1ea1adbf11a5a119d2bb97b3976fedb3d (diff) | |
parent | ebbf8f37ac3a15653c869d5d06173e8e9aa80ac7 (diff) | |
download | exchange-162f1a0825d685d1e2d91a908a6005cbe5cbf524.tar.gz exchange-162f1a0825d685d1e2d91a908a6005cbe5cbf524.tar.bz2 exchange-162f1a0825d685d1e2d91a908a6005cbe5cbf524.zip |
merge cedric branch
Diffstat (limited to 'src/auditor/taler-auditor-httpd_fee-time-inconsistency-get.c')
-rw-r--r-- | src/auditor/taler-auditor-httpd_fee-time-inconsistency-get.c | 72 |
1 files changed, 22 insertions, 50 deletions
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 ( |