diff options
author | Nic Eigel <nic@eigel.ch> | 2024-04-26 09:32:25 +0200 |
---|---|---|
committer | Nic Eigel <nic@eigel.ch> | 2024-04-26 09:32:25 +0200 |
commit | 157dd4fa26a039bf2600290b2680b3ba79b15b2a (patch) | |
tree | 39b3f1a2af210fd3a0fdcb9bbd712b5dd7c1f2cc /src/auditor/taler-auditor-httpd_reserves-get.c | |
parent | ba41bba2a251d00bd2411782890b9ae003243a98 (diff) | |
parent | 72f9b0cb96ee7daaa92f8e6891078fa5e0119ab3 (diff) | |
download | exchange-157dd4fa26a039bf2600290b2680b3ba79b15b2a.tar.gz exchange-157dd4fa26a039bf2600290b2680b3ba79b15b2a.tar.bz2 exchange-157dd4fa26a039bf2600290b2680b3ba79b15b2a.zip |
Merge remote-tracking branch 'origin/dev/nic/real-time-auditor-zwah' into dev/nic/real-time-auditor
# Conflicts:
# src/auditor/taler-auditor-httpd_denominations-without-sigs-get.c
# src/auditor/taler-auditor-httpd_deposit-confirmation-get.c
# src/auditor/taler-auditor-httpd_purse-not-closed-inconsistencies-get.c
# src/auditor/test-auditor.sh
# src/auditordb/pg_insert_reserve_balance_summary_wrong_inconsistency.c
Diffstat (limited to 'src/auditor/taler-auditor-httpd_reserves-get.c')
-rw-r--r-- | src/auditor/taler-auditor-httpd_reserves-get.c | 52 |
1 files changed, 23 insertions, 29 deletions
diff --git a/src/auditor/taler-auditor-httpd_reserves-get.c b/src/auditor/taler-auditor-httpd_reserves-get.c index 54b1a1863..5ba748eb6 100644 --- a/src/auditor/taler-auditor-httpd_reserves-get.c +++ b/src/auditor/taler-auditor-httpd_reserves-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,28 +36,29 @@ */ static enum GNUNET_GenericReturnValue process_reserves (void *cls, - uint64_t serial_id, - const struct - TALER_AUDITORDB_Reserves - *dc) + uint64_t serial_id, + const struct + TALER_AUDITORDB_Reserves + *dc) { json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( - GNUNET_JSON_pack_int64("auditor_reserves_rowid", dc->auditor_reserves_rowid), -GNUNET_JSON_pack_data_auto("reserve_pub", &dc->reserve_pub), -TALER_JSON_pack_amount("reserve_balance", &dc->reserve_balance), -TALER_JSON_pack_amount("reserve_loss", &dc->reserve_loss), -TALER_JSON_pack_amount("withdraw_fee_balance", &dc->withdraw_fee_balance), -TALER_JSON_pack_amount("close_fee_balance", &dc->close_fee_balance), -TALER_JSON_pack_amount("purse_fee_balance", &dc->purse_fee_balance), -TALER_JSON_pack_amount("open_fee_balance", &dc->open_fee_balance), -TALER_JSON_pack_amount("history_fee_balance", &dc->history_fee_balance), -GNUNET_JSON_pack_int64("expiration_date", dc->expiration_date), -GNUNET_JSON_pack_string("origin_account", dc->origin_account), -GNUNET_JSON_pack_bool("suppressed", dc->suppressed) + GNUNET_JSON_pack_int64 ("auditor_reserves_rowid", + dc->auditor_reserves_rowid), + GNUNET_JSON_pack_data_auto ("reserve_pub", &dc->reserve_pub), + TALER_JSON_pack_amount ("reserve_balance", &dc->reserve_balance), + TALER_JSON_pack_amount ("reserve_loss", &dc->reserve_loss), + TALER_JSON_pack_amount ("withdraw_fee_balance", &dc->withdraw_fee_balance), + TALER_JSON_pack_amount ("close_fee_balance", &dc->close_fee_balance), + TALER_JSON_pack_amount ("purse_fee_balance", &dc->purse_fee_balance), + TALER_JSON_pack_amount ("open_fee_balance", &dc->open_fee_balance), + TALER_JSON_pack_amount ("history_fee_balance", &dc->history_fee_balance), + GNUNET_JSON_pack_int64 ("expiration_date", dc->expiration_date), + GNUNET_JSON_pack_string ("origin_account", dc->origin_account), + GNUNET_JSON_pack_bool ("suppressed", dc->suppressed) ); @@ -85,12 +82,12 @@ GNUNET_JSON_pack_bool("suppressed", dc->suppressed) */ MHD_RESULT TAH_RESERVES_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; @@ -189,6 +186,3 @@ TAH_RESERVES_handler_get (struct TAH_RequestHandler *rh, GNUNET_JSON_pack_array_steal ("reserves", ja)); } - - -
\ No newline at end of file |