aboutsummaryrefslogtreecommitdiff
path: root/src/kyclogic/kyclogic_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-10-22 00:16:22 +0200
committerChristian Grothoff <christian@grothoff.org>2022-10-22 00:16:22 +0200
commit83ba13c8ee04f5ec8987ea16b3739dc89d1e2358 (patch)
treef9eca0015b36cc2dc93f8a0317cd253574e05f2c /src/kyclogic/kyclogic_api.c
parent6e56693071b29c1a06758f839dbba8ed63063d35 (diff)
downloadexchange-83ba13c8ee04f5ec8987ea16b3739dc89d1e2358.tar.xz
implement missing UT filtering logic
Diffstat (limited to 'src/kyclogic/kyclogic_api.c')
-rw-r--r--src/kyclogic/kyclogic_api.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/kyclogic/kyclogic_api.c b/src/kyclogic/kyclogic_api.c
index 0c4a51124..e7084ba41 100644
--- a/src/kyclogic/kyclogic_api.c
+++ b/src/kyclogic/kyclogic_api.c
@@ -1186,7 +1186,6 @@ TALER_KYCLOGIC_requirements_to_logic (const char *requirements,
unsigned int max_checks = 0;
const struct TALER_KYCLOGIC_KycProvider *kp_best = NULL;
- // FIXME: use 'ut' to filter providers!
if (NULL == requirements)
return GNUNET_NO;
{
@@ -1206,6 +1205,8 @@ TALER_KYCLOGIC_requirements_to_logic (const char *requirements,
const struct TALER_KYCLOGIC_KycProvider *kp = kyc_providers[i];
unsigned int matched = 0;
+ if (kp->user_type != ut)
+ continue;
for (unsigned int j = 0; j<kp->num_checks; j++)
{
const struct TALER_KYCLOGIC_KycCheck *kc = kp->provided_checks[j];
@@ -1229,6 +1230,8 @@ TALER_KYCLOGIC_requirements_to_logic (const char *requirements,
const struct TALER_KYCLOGIC_KycProvider *kp = kyc_providers[i];
unsigned int matched = 0;
+ if (kp->user_type != ut)
+ continue;
for (unsigned int j = 0; j<kp->num_checks; j++)
{
const struct TALER_KYCLOGIC_KycCheck *kc = kp->provided_checks[j];
@@ -1247,6 +1250,7 @@ TALER_KYCLOGIC_requirements_to_logic (const char *requirements,
kp_best = kp;
}
}
+ GNUNET_assert (NULL != kp_best);
*plugin = kp_best->logic;
*pd = kp_best->pd;
*configuration_section = kp_best->provider_section_name;