From 75f75c4a51c4700da9bde18cc9a9b5d9df1e8457 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 30 Apr 2023 16:21:07 +0200 Subject: breaking protocol changes towards fixing #7810 (incomplete, taler-exchange-offline still unfinished) --- src/lib/exchange_api_lookup_aml_decision.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/lib/exchange_api_lookup_aml_decision.c') diff --git a/src/lib/exchange_api_lookup_aml_decision.c b/src/lib/exchange_api_lookup_aml_decision.c index 897a21f1..fc1a8a8e 100644 --- a/src/lib/exchange_api_lookup_aml_decision.c +++ b/src/lib/exchange_api_lookup_aml_decision.c @@ -190,17 +190,17 @@ parse_decision_ok (struct TALER_EXCHANGE_LookupAmlDecision *lh, GNUNET_break_op (0); return GNUNET_SYSERR; } - lr.details.success.aml_history_length = json_array_size (aml_history); - lr.details.success.kyc_attributes_length = json_array_size (kyc_attributes); + lr.details.ok.aml_history_length = json_array_size (aml_history); + lr.details.ok.kyc_attributes_length = json_array_size (kyc_attributes); { struct TALER_EXCHANGE_AmlDecisionDetail aml_history_ar[ - GNUNET_NZL (lr.details.success.aml_history_length)]; + GNUNET_NZL (lr.details.ok.aml_history_length)]; struct TALER_EXCHANGE_KycHistoryDetail kyc_attributes_ar[ - lr.details.success.kyc_attributes_length]; + lr.details.ok.kyc_attributes_length]; enum GNUNET_GenericReturnValue ret = GNUNET_SYSERR; - lr.details.success.aml_history = aml_history_ar; - lr.details.success.kyc_attributes = kyc_attributes_ar; + lr.details.ok.aml_history = aml_history_ar; + lr.details.ok.kyc_attributes = kyc_attributes_ar; ret = parse_aml_history (aml_history, aml_history_ar); if (GNUNET_OK == ret) -- cgit v1.2.3 From 09f09a21045ed6407fd23a9edb23c6da9299604c Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 10 May 2023 01:07:20 +0200 Subject: fix more VLAs --- src/lib/exchange_api_lookup_aml_decision.c | 2 +- src/testing/testing_api_cmd_refresh.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/lib/exchange_api_lookup_aml_decision.c') diff --git a/src/lib/exchange_api_lookup_aml_decision.c b/src/lib/exchange_api_lookup_aml_decision.c index fc1a8a8e..39d53c51 100644 --- a/src/lib/exchange_api_lookup_aml_decision.c +++ b/src/lib/exchange_api_lookup_aml_decision.c @@ -196,7 +196,7 @@ parse_decision_ok (struct TALER_EXCHANGE_LookupAmlDecision *lh, struct TALER_EXCHANGE_AmlDecisionDetail aml_history_ar[ GNUNET_NZL (lr.details.ok.aml_history_length)]; struct TALER_EXCHANGE_KycHistoryDetail kyc_attributes_ar[ - lr.details.ok.kyc_attributes_length]; + GNUNET_NZL (lr.details.ok.kyc_attributes_length)]; enum GNUNET_GenericReturnValue ret = GNUNET_SYSERR; lr.details.ok.aml_history = aml_history_ar; diff --git a/src/testing/testing_api_cmd_refresh.c b/src/testing/testing_api_cmd_refresh.c index a8e2e8f3..9c2bd8d5 100644 --- a/src/testing/testing_api_cmd_refresh.c +++ b/src/testing/testing_api_cmd_refresh.c @@ -1239,9 +1239,11 @@ melt_traits (void *cls, TALER_TESTING_make_trait_h_age_commitment ( index, rms->refresh_data.melt_h_age_commitment), - TALER_TESTING_make_trait_exchange_wd_value (index, - &rms->mbds[index].alg_value), TALER_TESTING_make_trait_refresh_secret (&rms->rms), + (NULL != rms->mbds) + ? TALER_TESTING_make_trait_exchange_wd_value (index, + &rms->mbds[index].alg_value) + : TALER_TESTING_trait_end (), TALER_TESTING_trait_end () }; -- cgit v1.2.3 From 5259ea05321783a177cab9e30f77cb3dc6f54049 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 10 May 2023 01:21:52 +0200 Subject: -fix logging --- src/exchange/taler-exchange-httpd.c | 1 - src/lib/exchange_api_lookup_aml_decision.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src/lib/exchange_api_lookup_aml_decision.c') diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c index 6c6398bc..7e11655c 100644 --- a/src/exchange/taler-exchange-httpd.c +++ b/src/exchange/taler-exchange-httpd.c @@ -542,7 +542,6 @@ handle_get_aml (struct TEH_RequestContext *rc, TALER_EC_GENERIC_DB_FETCH_FAILED, NULL); case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: - GNUNET_break_op (0); return TALER_MHD_reply_with_error (rc->connection, MHD_HTTP_FORBIDDEN, TALER_EC_EXCHANGE_GENERIC_AML_OFFICER_ACCESS_DENIED, diff --git a/src/lib/exchange_api_lookup_aml_decision.c b/src/lib/exchange_api_lookup_aml_decision.c index 39d53c51..9e20c83b 100644 --- a/src/lib/exchange_api_lookup_aml_decision.c +++ b/src/lib/exchange_api_lookup_aml_decision.c @@ -256,6 +256,8 @@ handle_lookup_finished (void *cls, GNUNET_assert (NULL == lh->decision_cb); TALER_EXCHANGE_lookup_aml_decision_cancel (lh); return; + case MHD_HTTP_NO_CONTENT: + break; case MHD_HTTP_BAD_REQUEST: lr.hr.ec = TALER_JSON_get_error_code (j); lr.hr.hint = TALER_JSON_get_error_hint (j); -- cgit v1.2.3