summaryrefslogtreecommitdiff
path: root/src/exchangedb
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-02-26 21:05:31 +0100
committerChristian Grothoff <christian@grothoff.org>2024-02-26 21:05:31 +0100
commitf16b094ed6d5e851e3cb75c68158ad08a5a1fe5e (patch)
tree8071a17b28fe6e76ba22069af2a1b4782a4375f2 /src/exchangedb
parent6d2b01d1645a1520099aae9c59ce3b7da99310f4 (diff)
downloadexchange-f16b094ed6d5e851e3cb75c68158ad08a5a1fe5e.tar.gz
exchange-f16b094ed6d5e851e3cb75c68158ad08a5a1fe5e.tar.bz2
exchange-f16b094ed6d5e851e3cb75c68158ad08a5a1fe5e.zip
-improve KYC error handling
Diffstat (limited to 'src/exchangedb')
-rw-r--r--src/exchangedb/pg_get_pending_kyc_requirement_process.c7
-rw-r--r--src/exchangedb/pg_update_kyc_process_by_row.c4
2 files changed, 8 insertions, 3 deletions
diff --git a/src/exchangedb/pg_get_pending_kyc_requirement_process.c b/src/exchangedb/pg_get_pending_kyc_requirement_process.c
index 2a5808ff3..b9acddad1 100644
--- a/src/exchangedb/pg_get_pending_kyc_requirement_process.c
+++ b/src/exchangedb/pg_get_pending_kyc_requirement_process.c
@@ -40,11 +40,14 @@ TEH_PG_get_pending_kyc_requirement_process (
GNUNET_PQ_query_param_end
};
struct GNUNET_PQ_ResultSpec rs[] = {
- GNUNET_PQ_result_spec_string ("redirect_url",
- redirect_url),
+ GNUNET_PQ_result_spec_allow_null (
+ GNUNET_PQ_result_spec_string ("redirect_url",
+ redirect_url),
+ NULL),
GNUNET_PQ_result_spec_end
};
+ *redirect_url = NULL;
PREPARE (pg,
"get_pending_kyc_requirement_process",
"SELECT"
diff --git a/src/exchangedb/pg_update_kyc_process_by_row.c b/src/exchangedb/pg_update_kyc_process_by_row.c
index d379ee81d..c339436a8 100644
--- a/src/exchangedb/pg_update_kyc_process_by_row.c
+++ b/src/exchangedb/pg_update_kyc_process_by_row.c
@@ -48,7 +48,9 @@ TEH_PG_update_kyc_process_by_row (
(NULL != provider_legitimization_id)
? GNUNET_PQ_query_param_string (provider_legitimization_id)
: GNUNET_PQ_query_param_null (),
- GNUNET_PQ_query_param_string (redirect_url),
+ (NULL != redirect_url)
+ ? GNUNET_PQ_query_param_string (redirect_url)
+ : GNUNET_PQ_query_param_null (),
GNUNET_PQ_query_param_absolute_time (&expiration),
GNUNET_PQ_query_param_end
};