diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-05-16 14:17:33 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-05-16 14:17:33 +0200 |
commit | e371d76cfe1b78cd373046ca6be535157e41793c (patch) | |
tree | e882926873b4274e3b96e5429e7444aae6cca114 /src | |
parent | 30b953ff0f46a49c1a48b6d0b59d18c4cd30e0c6 (diff) | |
download | exchange-e371d76cfe1b78cd373046ca6be535157e41793c.tar.xz |
add KYC_AML_TRIGGER option (not implemented)
Diffstat (limited to 'src')
-rw-r--r-- | src/exchange/taler-exchange-httpd.c | 16 | ||||
-rw-r--r-- | src/exchange/taler-exchange-httpd.h | 5 | ||||
-rw-r--r-- | src/util/conversion.c | 23 |
3 files changed, 34 insertions, 10 deletions
diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c index 3a2c4c001..348967f77 100644 --- a/src/exchange/taler-exchange-httpd.c +++ b/src/exchange/taler-exchange-httpd.c @@ -154,6 +154,11 @@ struct TALER_EXCHANGEDB_Plugin *TEH_plugin; char *TEH_currency; /** + * Name of the KYC-AML-trigger evaluation binary. + */ +char *TEH_kyc_aml_trigger; + +/** * Option set to #GNUNET_YES if tipping is enabled. */ int TEH_enable_tipping; @@ -1850,6 +1855,17 @@ exchange_serve_process_config (void) return GNUNET_SYSERR; } if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_string (TEH_cfg, + "exchange", + "KYC_AML_TRIGGER", + &TEH_kyc_aml_trigger)) + { + GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, + "exchange", + "KYC_AML_TRIGGER"); + return GNUNET_SYSERR; + } + if (GNUNET_OK != TALER_config_get_currency (TEH_cfg, &TEH_currency)) { diff --git a/src/exchange/taler-exchange-httpd.h b/src/exchange/taler-exchange-httpd.h index e06807b59..24e087721 100644 --- a/src/exchange/taler-exchange-httpd.h +++ b/src/exchange/taler-exchange-httpd.h @@ -103,6 +103,11 @@ extern struct TALER_EXCHANGEDB_Plugin *TEH_plugin; extern char *TEH_currency; /** + * Name of the KYC-AML-trigger evaluation binary. + */ +extern char *TEH_kyc_aml_trigger; + +/** * What is the largest amount we allow a peer to * merge into a reserve before always triggering * an AML check? diff --git a/src/util/conversion.c b/src/util/conversion.c index 501ca0145..fdeffba40 100644 --- a/src/util/conversion.c +++ b/src/util/conversion.c @@ -251,7 +251,7 @@ child_done_cb (void *cls, long unsigned int exit_code) { struct TALER_JSON_ExternalConversion *ec = cls; - json_t *j; + json_t *j = NULL; json_error_t err; ec->cwh = NULL; @@ -269,16 +269,19 @@ child_done_cb (void *cls, } GNUNET_OS_process_destroy (ec->helper); ec->helper = NULL; - j = json_loadb (ec->read_buf, - ec->read_pos, - JSON_REJECT_DUPLICATES, - &err); - if (NULL == j) + if (0 != ec->read_pos) { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "Failed to parse JSON from helper at %d: %s\n", - err.position, - err.text); + j = json_loadb (ec->read_buf, + ec->read_pos, + JSON_REJECT_DUPLICATES, + &err); + if (NULL == j) + { + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Failed to parse JSON from helper at %d: %s\n", + err.position, + err.text); + } } ec->cb (ec->cb_cls, type, |