summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_common_kyc.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-09-24 11:51:47 +0200
committerChristian Grothoff <christian@grothoff.org>2023-09-24 11:51:47 +0200
commit7a3b1c6b88a86ccb98a9d60675f8f0c1a7e3fe45 (patch)
tree7a89527ea1551a4b97897db01bff1c942825811d /src/exchange/taler-exchange-httpd_common_kyc.c
parent4c220dce4d5ef33e00e937e236a744324af9dcf0 (diff)
downloadexchange-7a3b1c6b88a86ccb98a9d60675f8f0c1a7e3fe45.tar.gz
exchange-7a3b1c6b88a86ccb98a9d60675f8f0c1a7e3fe45.tar.bz2
exchange-7a3b1c6b88a86ccb98a9d60675f8f0c1a7e3fe45.zip
fix various FIXMEs
Diffstat (limited to 'src/exchange/taler-exchange-httpd_common_kyc.c')
-rw-r--r--src/exchange/taler-exchange-httpd_common_kyc.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/exchange/taler-exchange-httpd_common_kyc.c b/src/exchange/taler-exchange-httpd_common_kyc.c
index 5d4b4c111..2a7193f4d 100644
--- a/src/exchange/taler-exchange-httpd_common_kyc.c
+++ b/src/exchange/taler-exchange-httpd_common_kyc.c
@@ -131,8 +131,8 @@ kyc_aml_finished (void *cls,
&kyc_prox);
birthdate = json_string_value (json_object_get (kat->attributes,
TALER_ATTRIBUTE_BIRTHDATE));
-
- if (TEH_age_restriction_enabled)
+ if ( (TEH_age_restriction_enabled) &&
+ (NULL != birthdate) )
{
enum GNUNET_GenericReturnValue ret;
@@ -142,15 +142,16 @@ kyc_aml_finished (void *cls,
if (GNUNET_OK != ret)
{
- GNUNET_break (0);
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "Failed to parse birthdate `%s' from KYC attributes\n",
+ birthdate);
if (NULL != kat->response)
MHD_destroy_response (kat->response);
kat->http_status = MHD_HTTP_BAD_REQUEST;
kat->response = TALER_MHD_make_error (
TALER_EC_GENERIC_PARAMETER_MALFORMED,
TALER_ATTRIBUTE_BIRTHDATE);
-
- /* FIXME-Christian: shouldn't we return in the error case? */
+ goto RETURN_RESULT;
}
}
@@ -195,6 +196,7 @@ kyc_aml_finished (void *cls,
"do_insert_kyc_attributes");
/* Continued below to return the response */
}
+RETURN_RESULT:
/* Finally, return result to main handler */
kat->cb (kat->cb_cls,
kat->http_status,