From e371d76cfe1b78cd373046ca6be535157e41793c Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 16 May 2023 14:17:33 +0200 Subject: add KYC_AML_TRIGGER option (not implemented) --- src/util/conversion.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'src/util/conversion.c') diff --git a/src/util/conversion.c b/src/util/conversion.c index 501ca014..fdeffba4 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, -- cgit v1.2.3