diff options
Diffstat (limited to 'src/auditor/taler-auditor-httpd_wire-out-inconsistency-get.c')
-rw-r--r-- | src/auditor/taler-auditor-httpd_wire-out-inconsistency-get.c | 47 |
1 files changed, 20 insertions, 27 deletions
diff --git a/src/auditor/taler-auditor-httpd_wire-out-inconsistency-get.c b/src/auditor/taler-auditor-httpd_wire-out-inconsistency-get.c index 76a3bb631..3285e1787 100644 --- a/src/auditor/taler-auditor-httpd_wire-out-inconsistency-get.c +++ b/src/auditor/taler-auditor-httpd_wire-out-inconsistency-get.c @@ -1,6 +1,3 @@ - - - /* This file is part of TALER Copyright (C) 2024 Taler Systems SA @@ -18,7 +15,6 @@ */ - #include "platform.h" #include <gnunet/gnunet_util_lib.h> #include <gnunet/gnunet_json_lib.h> @@ -40,21 +36,21 @@ */ static enum GNUNET_GenericReturnValue process_wire_out_inconsistency (void *cls, - uint64_t serial_id, - const struct - TALER_AUDITORDB_WireOutInconsistency - *dc) + uint64_t serial_id, + const struct + TALER_AUDITORDB_WireOutInconsistency + *dc) { json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( - GNUNET_JSON_pack_int64("row_id", serial_id), -GNUNET_JSON_pack_string("destination_account", dc->destination_account), -TALER_JSON_pack_amount("expected", &dc->expected), -TALER_JSON_pack_amount("claimed", &dc->claimed), -GNUNET_JSON_pack_bool("suppressed", dc->suppressed) + GNUNET_JSON_pack_int64 ("row_id", serial_id), + GNUNET_JSON_pack_string ("destination_account", dc->destination_account), + TALER_JSON_pack_amount ("expected", &dc->expected), + TALER_JSON_pack_amount ("claimed", &dc->claimed), + GNUNET_JSON_pack_bool ("suppressed", dc->suppressed) ); @@ -78,12 +74,12 @@ GNUNET_JSON_pack_bool("suppressed", dc->suppressed) */ MHD_RESULT TAH_WIRE_OUT_INCONSISTENCY_handler_get (struct TAH_RequestHandler *rh, - struct MHD_Connection * - connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]) + struct MHD_Connection * + connection, + void **connection_cls, + const char *upload_data, + size_t *upload_data_size, + const char *const args[]) { json_t *ja; enum GNUNET_DB_QueryStatus qs; @@ -119,7 +115,7 @@ TAH_WIRE_OUT_INCONSISTENCY_handler_get (struct TAH_RequestHandler *rh, TALER_MHD_parse_request_number (connection, "offset", &offset); - + limit = 20; bool return_suppressed = false; struct GNUNET_JSON_Specification spec[] = { @@ -128,7 +124,7 @@ TAH_WIRE_OUT_INCONSISTENCY_handler_get (struct TAH_RequestHandler *rh, }; // read the input json - json_t *json_in; + /*json_t *json_in; { enum GNUNET_GenericReturnValue res; @@ -148,14 +144,14 @@ TAH_WIRE_OUT_INCONSISTENCY_handler_get (struct TAH_RequestHandler *rh, if (GNUNET_SYSERR == res) { json_decref (json_in); - return MHD_NO; /* hard failure */ + return MHD_NO; } if (GNUNET_NO == res) { json_decref (json_in); - return MHD_YES; /* failure */ + return MHD_YES; } - } + }*/ qs = TAH_plugin->get_wire_out_inconsistency ( TAH_plugin->cls, @@ -182,6 +178,3 @@ TAH_WIRE_OUT_INCONSISTENCY_handler_get (struct TAH_RequestHandler *rh, GNUNET_JSON_pack_array_steal ("wire-out-inconsistency", ja)); } - - -
\ No newline at end of file |