summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_kyc-check.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-11-09 22:52:01 +0100
committerChristian Grothoff <christian@grothoff.org>2021-11-09 22:52:01 +0100
commit77bab625607514a628dfda101e55c7d57f6b623d (patch)
tree29f78dd78176d37215ca29d259963a0b523fd07c /src/exchange/taler-exchange-httpd_kyc-check.c
parent016551dbb4af5de4725fb67787dff07c852c0280 (diff)
downloadexchange-77bab625607514a628dfda101e55c7d57f6b623d.tar.gz
exchange-77bab625607514a628dfda101e55c7d57f6b623d.tar.bz2
exchange-77bab625607514a628dfda101e55c7d57f6b623d.zip
-fixes for test
Diffstat (limited to 'src/exchange/taler-exchange-httpd_kyc-check.c')
-rw-r--r--src/exchange/taler-exchange-httpd_kyc-check.c30
1 files changed, 27 insertions, 3 deletions
diff --git a/src/exchange/taler-exchange-httpd_kyc-check.c b/src/exchange/taler-exchange-httpd_kyc-check.c
index 5964da501..79e85ca00 100644
--- a/src/exchange/taler-exchange-httpd_kyc-check.c
+++ b/src/exchange/taler-exchange-httpd_kyc-check.c
@@ -119,7 +119,31 @@ TEH_handler_kyc_check (
TALER_EC_GENERIC_PARAMETER_MALFORMED,
"payment_target_uuid");
}
- /* FIXME: write long polling logic ... */
+ {
+ const char *ts;
+
+ ts = MHD_lookup_connection_value (rc->connection,
+ MHD_GET_ARGUMENT_KIND,
+ "timeout_ms");
+ if (NULL != ts)
+ {
+ unsigned long long tms;
+
+ if (1 !=
+ sscanf (ts,
+ "%llu%c",
+ &tms,
+ &dummy))
+ {
+ GNUNET_break_op (0);
+ return TALER_MHD_reply_with_error (rc->connection,
+ MHD_HTTP_BAD_REQUEST,
+ TALER_EC_GENERIC_PARAMETER_MALFORMED,
+ "timeout_ms");
+ }
+ /* FIXME: write long polling logic ... */
+ }
+ }
{
const char *hps;
@@ -176,8 +200,8 @@ TEH_handler_kyc_check (
{
GNUNET_break_op (0);
return TALER_MHD_reply_with_error (rc->connection,
- MHD_HTTP_FORBIDDEN,
- 42, /* FIXME: EC! */
+ MHD_HTTP_UNAUTHORIZED,
+ TALER_EC_EXCHANGE_KYC_CHECK_AUTHORIZATION_FAILED,
"h_payto");
}
if (! kcc.kyc.ok)