summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNic Eigel <nic@eigel.ch>2024-04-26 16:44:26 +0200
committerNic Eigel <nic@eigel.ch>2024-04-26 16:44:26 +0200
commit162f1a0825d685d1e2d91a908a6005cbe5cbf524 (patch)
tree5deb3768bdaceec1c243fc4db3b51ab937183309
parentdf3aada1ea1adbf11a5a119d2bb97b3976fedb3d (diff)
parentebbf8f37ac3a15653c869d5d06173e8e9aa80ac7 (diff)
downloadexchange-dev/nic/real-time-auditor.tar.gz
exchange-dev/nic/real-time-auditor.tar.bz2
exchange-dev/nic/real-time-auditor.zip
merge cedric branchdev/nic/real-time-auditor
-rw-r--r--src/auditor/taler-auditor-httpd_deposit-confirmation-get.c3
-rw-r--r--src/auditor/taler-auditor-httpd_exchange-signkeys-get.c38
-rw-r--r--src/auditor/taler-auditor-httpd_fee-time-inconsistency-get.c72
-rw-r--r--src/auditor/taler-auditor-httpd_historic-denomination-revenue-get.c38
-rw-r--r--src/auditor/taler-auditor-httpd_historic-reserve-summary-get.c38
-rw-r--r--src/auditor/taler-auditor-httpd_misattribution-in-inconsistency-get.c38
-rw-r--r--src/auditor/taler-auditor-httpd_progress-get.c73
-rw-r--r--src/auditor/taler-auditor-httpd_purses-get.c38
-rw-r--r--src/auditor/taler-auditor-httpd_refreshes-hanging-get.c73
-rw-r--r--src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-get.c40
-rw-r--r--src/auditor/taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-get.c41
-rw-r--r--src/auditor/taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-put.c1
-rw-r--r--src/auditor/taler-auditor-httpd_reserve-in-inconsistency-get.c38
-rw-r--r--src/auditor/taler-auditor-httpd_reserve-in-inconsistency-put.c2
-rw-r--r--src/auditor/taler-auditor-httpd_row-inconsistency-get.c38
-rw-r--r--src/auditordb/pg_get_reserve_balance_summary_wrong_inconsistency.c3
-rw-r--r--src/auditordb/pg_insert_reserve_balance_summary_wrong_inconsistency.c13
17 files changed, 138 insertions, 449 deletions
diff --git a/src/auditor/taler-auditor-httpd_deposit-confirmation-get.c b/src/auditor/taler-auditor-httpd_deposit-confirmation-get.c
index 3a3719e77..e53b29a6b 100644
--- a/src/auditor/taler-auditor-httpd_deposit-confirmation-get.c
+++ b/src/auditor/taler-auditor-httpd_deposit-confirmation-get.c
@@ -77,7 +77,8 @@ TAH_DEPOSIT_CONFIRMATION_handler_get (struct TAH_RequestHandler *rh,
{
json_t *ja;
enum GNUNET_DB_QueryStatus qs;
-
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "getting in here 2\n");
(void) rh;
(void) connection_cls;
(void) upload_data;
diff --git a/src/auditor/taler-auditor-httpd_exchange-signkeys-get.c b/src/auditor/taler-auditor-httpd_exchange-signkeys-get.c
index 003f33d08..06b606a31 100644
--- a/src/auditor/taler-auditor-httpd_exchange-signkeys-get.c
+++ b/src/auditor/taler-auditor-httpd_exchange-signkeys-get.c
@@ -118,40 +118,12 @@ TAH_EXCHANGE_SIGNKEYS_handler_get (struct TAH_RequestHandler *rh,
&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;
+ 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_exchange_signkeys (
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 (
diff --git a/src/auditor/taler-auditor-httpd_historic-denomination-revenue-get.c b/src/auditor/taler-auditor-httpd_historic-denomination-revenue-get.c
index ff9f7b71e..acb9535d4 100644
--- a/src/auditor/taler-auditor-httpd_historic-denomination-revenue-get.c
+++ b/src/auditor/taler-auditor-httpd_historic-denomination-revenue-get.c
@@ -117,40 +117,12 @@ TAH_HISTORIC_DENOMINATION_REVENUE_handler_get (struct TAH_RequestHandler *rh,
&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;
+ 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_historic_denomination_revenue (
diff --git a/src/auditor/taler-auditor-httpd_historic-reserve-summary-get.c b/src/auditor/taler-auditor-httpd_historic-reserve-summary-get.c
index b58c5f3cb..2270d4e17 100644
--- a/src/auditor/taler-auditor-httpd_historic-reserve-summary-get.c
+++ b/src/auditor/taler-auditor-httpd_historic-reserve-summary-get.c
@@ -116,40 +116,12 @@ TAH_HISTORIC_RESERVE_SUMMARY_handler_get (struct TAH_RequestHandler *rh,
&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;
+ 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_historic_reserve_summary (
diff --git a/src/auditor/taler-auditor-httpd_misattribution-in-inconsistency-get.c b/src/auditor/taler-auditor-httpd_misattribution-in-inconsistency-get.c
index a282721ce..f10291bc7 100644
--- a/src/auditor/taler-auditor-httpd_misattribution-in-inconsistency-get.c
+++ b/src/auditor/taler-auditor-httpd_misattribution-in-inconsistency-get.c
@@ -117,40 +117,12 @@ TAH_MISATTRIBUTION_IN_INCONSISTENCY_handler_get (struct TAH_RequestHandler *rh,
&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;
+ 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_misattribution_in_inconsistency (
diff --git a/src/auditor/taler-auditor-httpd_progress-get.c b/src/auditor/taler-auditor-httpd_progress-get.c
index 2ebc8976b..678cfa802 100644
--- a/src/auditor/taler-auditor-httpd_progress-get.c
+++ b/src/auditor/taler-auditor-httpd_progress-get.c
@@ -96,58 +96,29 @@ TAH_PROGRESS_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_progress (
diff --git a/src/auditor/taler-auditor-httpd_purses-get.c b/src/auditor/taler-auditor-httpd_purses-get.c
index 2ce236fc4..81b5e16a7 100644
--- a/src/auditor/taler-auditor-httpd_purses-get.c
+++ b/src/auditor/taler-auditor-httpd_purses-get.c
@@ -118,40 +118,12 @@ TAH_PURSES_handler_get (struct TAH_RequestHandler *rh,
&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;
+ 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_purses (
diff --git a/src/auditor/taler-auditor-httpd_refreshes-hanging-get.c b/src/auditor/taler-auditor-httpd_refreshes-hanging-get.c
index d8654d2c8..b79cf20ca 100644
--- a/src/auditor/taler-auditor-httpd_refreshes-hanging-get.c
+++ b/src/auditor/taler-auditor-httpd_refreshes-hanging-get.c
@@ -99,58 +99,29 @@ TAH_REFRESHES_HANGING_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_refreshes_hanging (
diff --git a/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-get.c b/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-get.c
index 859331f66..7dc9eb57d 100644
--- a/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-get.c
+++ b/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-get.c
@@ -127,43 +127,13 @@ TAH_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_handler_get (struct
&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;
+ 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_reserve_balance_insufficient_inconsistency (
TAH_plugin->cls,
limit,
diff --git a/src/auditor/taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-get.c b/src/auditor/taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-get.c
index f6e2df645..29507ac39 100644
--- a/src/auditor/taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-get.c
+++ b/src/auditor/taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-get.c
@@ -122,43 +122,16 @@ TAH_RESERVE_BALANCE_SUMMARY_WRONG_INCONSISTENCY_handler_get (struct
TALER_MHD_parse_request_number (connection,
"offset",
&offset);
- limit = 0;
- bool return_suppressed = false;
- struct GNUNET_JSON_Specification spec[] = {
- GNUNET_JSON_spec_bool ("return_suppressed", &return_suppressed),
- GNUNET_JSON_spec_end ()
- };
+ bool return_suppressed = false;
+ const char *ret_s = MHD_lookup_connection_value (connection,
+ MHD_GET_ARGUMENT_KIND,
+ "return_suppressed");
- // read the input json
- /*json_t *json_in;
+ 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;
- }
- if (GNUNET_NO == res)
- {
- json_decref (json_in);
- return MHD_YES;
- }
- } */
+ return_suppressed = true;
+ }
qs = TAH_plugin->get_reserve_balance_summary_wrong_inconsistency (
TAH_plugin->cls,
diff --git a/src/auditor/taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-put.c b/src/auditor/taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-put.c
index 7cd7c31a7..231daf569 100644
--- a/src/auditor/taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-put.c
+++ b/src/auditor/taler-auditor-httpd_reserve-balance-summary-wrong-inconsistency-put.c
@@ -93,7 +93,6 @@ TAH_RESERVE_BALANCE_SUMMARY_WRONG_INCONSISTENCY_handler_put (
TALER_JSON_spec_amount ("exchange_amount", TAH_currency,
&dc.exchange_amount),
TALER_JSON_spec_amount ("auditor_amount", TAH_currency, &dc.auditor_amount),
- GNUNET_JSON_spec_bool ("suppressed", &dc.suppressed),
GNUNET_JSON_spec_end ()
diff --git a/src/auditor/taler-auditor-httpd_reserve-in-inconsistency-get.c b/src/auditor/taler-auditor-httpd_reserve-in-inconsistency-get.c
index b691a4446..2131ebc41 100644
--- a/src/auditor/taler-auditor-httpd_reserve-in-inconsistency-get.c
+++ b/src/auditor/taler-auditor-httpd_reserve-in-inconsistency-get.c
@@ -121,40 +121,12 @@ TAH_RESERVE_IN_INCONSISTENCY_handler_get (struct TAH_RequestHandler *rh,
&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;
+ 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_reserve_in_inconsistency (
diff --git a/src/auditor/taler-auditor-httpd_reserve-in-inconsistency-put.c b/src/auditor/taler-auditor-httpd_reserve-in-inconsistency-put.c
index dd1765b45..02f93a81b 100644
--- a/src/auditor/taler-auditor-httpd_reserve-in-inconsistency-put.c
+++ b/src/auditor/taler-auditor-httpd_reserve-in-inconsistency-put.c
@@ -88,7 +88,6 @@ TAH_RESERVE_IN_INCONSISTENCY_handler_put (
struct GNUNET_JSON_Specification spec[] = {
- GNUNET_JSON_spec_int64 ("row_id", dc.row_id),
TALER_JSON_spec_amount ("amount_exchange_expected", TAH_currency,
&dc.amount_exchange_expected),
TALER_JSON_spec_amount ("amount_wired", TAH_currency, &dc.amount_wired),
@@ -96,7 +95,6 @@ TAH_RESERVE_IN_INCONSISTENCY_handler_put (
GNUNET_JSON_spec_int64 ("timestamp", &dc.timestamp),
GNUNET_JSON_spec_fixed_auto ("account", &dc.account),
GNUNET_JSON_spec_fixed_auto ("diagnostic", &dc.diagnostic),
- GNUNET_JSON_spec_bool ("suppressed", &dc.suppressed),
GNUNET_JSON_spec_end ()
diff --git a/src/auditor/taler-auditor-httpd_row-inconsistency-get.c b/src/auditor/taler-auditor-httpd_row-inconsistency-get.c
index f2c70a843..9826c0dd3 100644
--- a/src/auditor/taler-auditor-httpd_row-inconsistency-get.c
+++ b/src/auditor/taler-auditor-httpd_row-inconsistency-get.c
@@ -31,8 +31,6 @@ add_row_inconsistency (void *cls,
json_t *list = cls;
json_t *obj;
- printf ("checkpoint pg_3\n");
-
obj = GNUNET_JSON_PACK (
// TODO: is it string?
GNUNET_JSON_pack_string ("row_table",
@@ -44,8 +42,6 @@ add_row_inconsistency (void *cls,
json_array_append_new (list,
obj));
- printf ("checkpoint pg_4\n");
-
return GNUNET_OK;
}
@@ -87,28 +83,28 @@ TAH_ROW_INCONSISTENCY_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 ()
- };
+ struct GNUNET_JSON_Specification spec[] = {
+ GNUNET_JSON_spec_bool ("return_suppressed", &return_suppressed),
+ GNUNET_JSON_spec_end ()
+ };
// read the input json
diff --git a/src/auditordb/pg_get_reserve_balance_summary_wrong_inconsistency.c b/src/auditordb/pg_get_reserve_balance_summary_wrong_inconsistency.c
index a2ae412f0..72c169a56 100644
--- a/src/auditordb/pg_get_reserve_balance_summary_wrong_inconsistency.c
+++ b/src/auditordb/pg_get_reserve_balance_summary_wrong_inconsistency.c
@@ -72,10 +72,11 @@ reserve_balance_summary_wrong_inconsistency_cb (void *cls,
struct TALER_AUDITORDB_ReserveBalanceSummaryWrongInconsistency dc;
+ bool isNull = false;
+
struct GNUNET_PQ_ResultSpec rs[] = {
GNUNET_PQ_result_spec_uint64 ("row_id", &serial_id),
-
GNUNET_PQ_result_spec_auto_from_type ("reserve_pub", &dc.reserve_pub),
TALER_PQ_RESULT_SPEC_AMOUNT ("exchange_amount", &dc.exchange_amount),
TALER_PQ_RESULT_SPEC_AMOUNT ("auditor_amount", &dc.auditor_amount),
diff --git a/src/auditordb/pg_insert_reserve_balance_summary_wrong_inconsistency.c b/src/auditordb/pg_insert_reserve_balance_summary_wrong_inconsistency.c
index 0e9d7036a..5284b6224 100644
--- a/src/auditordb/pg_insert_reserve_balance_summary_wrong_inconsistency.c
+++ b/src/auditordb/pg_insert_reserve_balance_summary_wrong_inconsistency.c
@@ -32,8 +32,6 @@ TAH_PG_insert_reserve_balance_summary_wrong_inconsistency (
GNUNET_PQ_query_param_auto_from_type (&dc->reserve_pub),
TALER_PQ_query_param_amount (pg->conn, &dc->exchange_amount),
TALER_PQ_query_param_amount (pg->conn, &dc->auditor_amount),
- GNUNET_PQ_query_param_bool (dc->suppressed),
-
GNUNET_PQ_query_param_end
};
@@ -41,11 +39,18 @@ TAH_PG_insert_reserve_balance_summary_wrong_inconsistency (
PREPARE (pg,
"auditor_reserve_balance_summary_wrong_inconsistency_insert",
"INSERT INTO auditor_reserve_balance_summary_wrong_inconsistency "
- "( reserve_pub,"
+ << << << << < Temporary merge branch 1
+ "( row_id,"
+ " reserve_pub,"
" exchange_amount,"
" auditor_amount,"
" suppressed"
- ") VALUES ($1,$2,$3,$4);"
+ ") VALUES ($1,$2,$3,$4,$5);"
+ ======== =
+ "( reserve_pub,"
+ " exchange_amount,"
+ " auditor_amount"
+ ") VALUES ($1,$2,$3);"
);
return GNUNET_PQ_eval_prepared_non_select (pg->conn,
"auditor_reserve_balance_summary_wrong_inconsistency_insert",