summaryrefslogtreecommitdiff
path: root/src/auditor/taler-auditor-httpd_purse-not-closed-inconsistencies-get.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/auditor/taler-auditor-httpd_purse-not-closed-inconsistencies-get.c')
-rw-r--r--src/auditor/taler-auditor-httpd_purse-not-closed-inconsistencies-get.c62
1 files changed, 14 insertions, 48 deletions
diff --git a/src/auditor/taler-auditor-httpd_purse-not-closed-inconsistencies-get.c b/src/auditor/taler-auditor-httpd_purse-not-closed-inconsistencies-get.c
index ef60854a4..8e5f8b0b9 100644
--- a/src/auditor/taler-auditor-httpd_purse-not-closed-inconsistencies-get.c
+++ b/src/auditor/taler-auditor-httpd_purse-not-closed-inconsistencies-get.c
@@ -53,7 +53,7 @@ process_purse_not_closed_inconsistencies (void *cls,
GNUNET_JSON_pack_data_auto ("purse_pub", &dc->purse_pub),
TALER_JSON_pack_amount ("amount", &dc->amount),
- GNUNET_JSON_pack_int64 ("expiration_date", dc->expiration_date)
+ GNUNET_JSON_pack_int64 ("expiration_date", &dc->expiration_date)
);
@@ -103,58 +103,24 @@ TAH_PURSE_NOT_CLOSED_INCONSISTENCIES_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 ()
- };
-
- // read the input json
- json_t *json_in;
- {
- 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 */
- }
- }
qs = TAH_plugin->get_purse_not_closed_inconsistencies (
TAH_plugin->cls,