aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2024-10-30 14:34:48 +0100
committerFlorian Dold <florian@dold.me>2024-10-31 14:11:27 +0100
commit2684bbee26d4408f20b1fbe8540d483e0925ac46 (patch)
tree5a5c74424b6f5075f5015dad4e967295bdbef915
parente89602e1296e3ecdaf14979ecc9ad132d21c9c95 (diff)
fix handling of skip checks in kyc-info
-rw-r--r--src/exchange/taler-exchange-httpd_kyc-info.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/exchange/taler-exchange-httpd_kyc-info.c b/src/exchange/taler-exchange-httpd_kyc-info.c
index 681d0321b..9639dac95 100644
--- a/src/exchange/taler-exchange-httpd_kyc-info.c
+++ b/src/exchange/taler-exchange-httpd_kyc-info.c
@@ -359,8 +359,24 @@ contains_instant_measure (const json_t *jmeasures)
const char *ename;
unsigned int eline;
enum GNUNET_GenericReturnValue ret;
+ const json_t *measures;
+ struct GNUNET_JSON_Specification spec[] = {
+ GNUNET_JSON_spec_array_const ("measures",
+ &measures),
+ GNUNET_JSON_spec_end ()
+ };
- json_array_foreach ((json_t *) jmeasures, i, mi)
+ ret = GNUNET_JSON_parse (jmeasures,
+ spec,
+ &ename,
+ &eline);
+ if (GNUNET_OK != ret)
+ {
+ GNUNET_break (0);
+ return false;
+ }
+
+ json_array_foreach ((json_t *) measures, i, mi)
{
const char *check_name;
@@ -601,6 +617,8 @@ TEH_handler_kyc_info (
{
json_decref (jmeasures);
json_decref (jvoluntary);
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Still waiting for KYC program.\n");
return TALER_MHD_reply_with_ec (
rc->connection,
TALER_EC_EXCHANGE_KYC_INFO_BUSY,
@@ -626,6 +644,8 @@ TEH_handler_kyc_info (
&add_response_headers,
NULL);
}
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Generating success reply to kyc-info query\n");
res = generate_reply (kyp,
legitimization_measure_last_row,
legitimization_outcome_last_row,