[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: store actual form name instead o
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: store actual form name instead of 'FORM' when persisting FORM upload data |
Date: |
Thu, 02 Jan 2025 12:30:57 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new 70994304e store actual form name instead of 'FORM' when persisting
FORM upload data
70994304e is described below
commit 70994304ed12d6a595c2a79b251f6f7fae364065
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Thu Jan 2 12:30:49 2025 +0100
store actual form name instead of 'FORM' when persisting FORM upload data
---
src/exchange/taler-exchange-httpd_kyc-upload.c | 8 ++++++--
src/include/taler_kyclogic_lib.h | 2 ++
src/kyclogic/kyclogic_api.c | 3 +++
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/exchange/taler-exchange-httpd_kyc-upload.c
b/src/exchange/taler-exchange-httpd_kyc-upload.c
index a87d157ca..69b6ef55f 100644
--- a/src/exchange/taler-exchange-httpd_kyc-upload.c
+++ b/src/exchange/taler-exchange-httpd_kyc-upload.c
@@ -479,6 +479,7 @@ TEH_handler_kyc_upload (
size_t enc_attributes_len;
void *enc_attributes;
const char *error_message;
+ char *form_name;
enum TALER_ErrorCode ec;
qs = TEH_plugin->lookup_completed_legitimization (
@@ -562,6 +563,7 @@ TEH_handler_kyc_upload (
ec = TALER_KYCLOGIC_check_form (jmeasures,
uc->measure_index,
uc->result,
+ &form_name,
&error_message);
if (TALER_EC_NONE != ec)
{
@@ -580,13 +582,14 @@ TEH_handler_kyc_upload (
&h_payto,
uc->measure_index,
uc->legitimization_measure_serial_id,
- "FORM", /* FIXME: get specific form name in DB interaction above! */
+ form_name,
NULL, /* provider account ID */
NULL, /* provider legi ID */
&legi_process_row);
if (qs <= 0)
{
GNUNET_break (0);
+ GNUNET_free (form_name);
return TALER_MHD_reply_with_error (
rc->connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
@@ -596,11 +599,12 @@ TEH_handler_kyc_upload (
qs = TEH_kyc_store_attributes (
legi_process_row,
&h_payto,
- "FORM", /* FIXME: get specific form name in DB interaction above! */
+ form_name,
NULL /* provider account */,
NULL /* provider legi ID */,
GNUNET_TIME_UNIT_FOREVER_ABS, /* expiration time */
uc->result);
+ GNUNET_free (form_name);
if (0 >= qs)
{
GNUNET_break (0);
diff --git a/src/include/taler_kyclogic_lib.h b/src/include/taler_kyclogic_lib.h
index 65babebfb..b9421d5b0 100644
--- a/src/include/taler_kyclogic_lib.h
+++ b/src/include/taler_kyclogic_lib.h
@@ -598,6 +598,7 @@ TALER_KYCLOGIC_select_measure (
* @param jmeasures a LegitimizationMeasures object
* @param measure_index an index into the measures
* @param form_data form data submitted for the measure
+ * @param[out] form_name set to the form name (on success)
* @param[out] error_message set to error details
* @return #TALER_EC_NONE if the form data matches the measure
*/
@@ -606,6 +607,7 @@ TALER_KYCLOGIC_check_form (
const json_t *jmeasures,
size_t measure_index,
const json_t *form_data,
+ char **form_name,
const char **error_message);
diff --git a/src/kyclogic/kyclogic_api.c b/src/kyclogic/kyclogic_api.c
index 9e50a277e..d8807d285 100644
--- a/src/kyclogic/kyclogic_api.c
+++ b/src/kyclogic/kyclogic_api.c
@@ -3782,6 +3782,7 @@ TALER_KYCLOGIC_check_form (
const json_t *jmeasures,
size_t measure_index,
const json_t *form_data,
+ char **form_name,
const char **error_message)
{
const char *check_name;
@@ -3791,6 +3792,7 @@ TALER_KYCLOGIC_check_form (
struct TALER_KYCLOGIC_AmlProgram *prog;
*error_message = NULL;
+ *form_name = NULL;
if (TALER_EC_NONE !=
TALER_KYCLOGIC_select_measure (jmeasures,
measure_index,
@@ -3835,6 +3837,7 @@ TALER_KYCLOGIC_check_form (
return TALER_EC_EXCHANGE_KYC_AML_FORM_INCOMPLETE;
}
}
+ *form_name = GNUNET_strdup (kc->details.form.name);
return TALER_EC_NONE;
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: store actual form name instead of 'FORM' when persisting FORM upload data,
gnunet <=