summaryrefslogtreecommitdiff
path: root/src/auditor/taler-auditor-httpd_coin-inconsistency-get.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/auditor/taler-auditor-httpd_coin-inconsistency-get.c')
-rw-r--r--src/auditor/taler-auditor-httpd_coin-inconsistency-get.c35
1 files changed, 21 insertions, 14 deletions
diff --git a/src/auditor/taler-auditor-httpd_coin-inconsistency-get.c b/src/auditor/taler-auditor-httpd_coin-inconsistency-get.c
index ca08f7d4c..84f7a6f60 100644
--- a/src/auditor/taler-auditor-httpd_coin-inconsistency-get.c
+++ b/src/auditor/taler-auditor-httpd_coin-inconsistency-get.c
@@ -31,8 +31,6 @@ add_coin_inconsistency (void *cls,
json_t *list = cls;
json_t *obj;
- printf ("checkpoint pg_3\n");
-
obj = GNUNET_JSON_PACK (
GNUNET_JSON_pack_data_auto ("operation", &dc->operation),
TALER_JSON_pack_amount ("exchange_amount", &dc->exchange_amount),
@@ -45,7 +43,7 @@ add_coin_inconsistency (void *cls,
json_array_append_new (list,
obj));
- printf ("checkpoint pg_4\n");
+
return GNUNET_OK;
}
@@ -87,19 +85,28 @@ TAH_COIN_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);
- uint64_t row_id = 0;
- bool return_suppressed;
+ if (limit < 0)
+ offset = INT64_MAX;
+ else
+ offset = 0;
- struct GNUNET_JSON_Specification spec[] = {
- GNUNET_JSON_spec_uint64 ("row_id",
- &row_id),
+ TALER_MHD_parse_request_number (connection,
+ "offset",
+ &offset);
- GNUNET_JSON_spec_bool ("return_suppressed",
- &return_suppressed),
+ bool return_suppressed = false;
- 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
@@ -132,11 +139,11 @@ TAH_COIN_INCONSISTENCY_handler_get (struct TAH_RequestHandler *rh,
}
}
- printf ("checkpoint httpd\n");
qs = TAH_plugin->get_coin_inconsistency (
TAH_plugin->cls,
- row_id,
+ limit,
+ offset,
return_suppressed,
&add_coin_inconsistency,
ja);