From fa99c50d3346c47793aa463656ff1d8ad86354ca Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 30 Sep 2021 14:43:12 +0200 Subject: allow providers to be enabled/disabled (fixes #6918) --- src/anastasis/anastasis-gtk_action.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/anastasis/anastasis-gtk_action.c') diff --git a/src/anastasis/anastasis-gtk_action.c b/src/anastasis/anastasis-gtk_action.c index 921df60..6863c65 100644 --- a/src/anastasis/anastasis-gtk_action.c +++ b/src/anastasis/anastasis-gtk_action.c @@ -708,7 +708,8 @@ action_authentications_editing (void) { uint32_t ec = 0; uint32_t hc = 0; - json_t *methods; + bool disabled = false; + json_t *methods = NULL; struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_mark_optional ( GNUNET_JSON_spec_uint32 ("error_code", @@ -716,8 +717,13 @@ action_authentications_editing (void) GNUNET_JSON_spec_mark_optional ( GNUNET_JSON_spec_json ("methods", &methods)), - GNUNET_JSON_spec_uint32 ("http_status", - &hc), + GNUNET_JSON_spec_mark_optional ( + GNUNET_JSON_spec_uint32 ("http_status", + &hc)), + GNUNET_JSON_spec_mark_optional ( + GNUNET_JSON_spec_bool ("disabled", + &disabled)), + GNUNET_JSON_spec_end () }; @@ -729,6 +735,8 @@ action_authentications_editing (void) GNUNET_break (0); continue; } + if (disabled) + continue; switch (hc) { case MHD_HTTP_OK: @@ -820,7 +828,7 @@ action_authentications_editing (void) * @param[out] method_cost cost to return * @return #GNUNET_OK on success */ -static int +static enum GNUNET_GenericReturnValue lookup_recovery_cost (const char *provider, const char *type, struct TALER_Amount *method_cost) -- cgit v1.2.3