exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit fb18f4badf05f4c23a42e7eb542e8da9265e0c79
parent 34792f237f836ffd654465cd826569a48f348fbf
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Sat, 15 Aug 2026 21:24:22 +0200

handle converter errors better

Diffstat:
Msrc/kyclogic/plugin_kyclogic_kycaid.c | 10+++++++---
Msrc/kyclogic/plugin_kyclogic_oauth2.c | 7+++++--
Msrc/kyclogic/plugin_kyclogic_persona.c | 12+++++++++---
3 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/src/kyclogic/plugin_kyclogic_kycaid.c b/src/kyclogic/plugin_kyclogic_kycaid.c @@ -881,7 +881,8 @@ webhook_conversion_cb (void *cls, struct MHD_Response *resp; wh->econ = NULL; - if ( (0 == code) && + if ( (GNUNET_OS_PROCESS_EXITED == status_type) && + (0 == code) && (NULL == result) ) { /* No result, but *our helper* was OK => bad input */ @@ -911,11 +912,14 @@ webhook_conversion_cb (void *cls, kycaid_webhook_cancel (wh); return; } - if (NULL == result) + if ( (NULL == result) || + (GNUNET_OS_PROCESS_EXITED != status_type) || + (0 != code) ) { /* Failure in our helper */ GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "Helper exited with status code %d\n", + "Helper died with status %d/%d\n", + (int) status_type, (int) code); #if DEBUG json_dumpf (wh->json_response, diff --git a/src/kyclogic/plugin_kyclogic_oauth2.c b/src/kyclogic/plugin_kyclogic_oauth2.c @@ -1125,6 +1125,7 @@ converted_proof_cb (void *cls, ph->ec = NULL; if ( (NULL == attr) || + (GNUNET_OS_PROCESS_EXITED != status_type) || (0 != code) ) { json_t *body; @@ -1133,9 +1134,11 @@ converted_proof_cb (void *cls, GNUNET_break_op (0); ph->status = TALER_KYCLOGIC_STATUS_PROVIDER_FAILED; ph->http_status = MHD_HTTP_BAD_GATEWAY; - if (0 != code) + if ( (GNUNET_OS_PROCESS_EXITED != status_type) || + (0 != code) ) GNUNET_asprintf (&msg, - "Attribute converter exited with status %ld", + "Attribute converter died with status %d/%ld", + (int) status_type, code); else msg = GNUNET_strdup ( diff --git a/src/kyclogic/plugin_kyclogic_persona.c b/src/kyclogic/plugin_kyclogic_persona.c @@ -1120,6 +1120,7 @@ proof_post_conversion_cb (void *cls, ph->ec = NULL; if ( (NULL == attr) || + (GNUNET_OS_PROCESS_EXITED != status_type) || (0 != code) ) { GNUNET_break_op (0); @@ -1692,14 +1693,19 @@ webhook_post_conversion_cb (void *cls, struct TALER_KYCLOGIC_WebhookHandle *wh = cls; wh->ec = NULL; - if (! json_is_string (json_object_get (attr, - "FORM_ID"))) + if ( (GNUNET_OS_PROCESS_EXITED != status_type) || + (0 != code) || + (! json_is_string (json_object_get (attr, + "FORM_ID"))) ) { struct MHD_Response *resp; /* Failure in our helper */ GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "Mandatory FORM_ID not set in result\n"); + "Converter died with status %d/%d or " + "mandatory FORM_ID not set in result\n", + (int) status_type, + (int) code); #if DEBUG json_dumpf (attr, stderr,