diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-09-30 14:43:12 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-09-30 14:43:12 +0200 |
commit | fa99c50d3346c47793aa463656ff1d8ad86354ca (patch) | |
tree | e5c2e0ba6d0adda2713603c30c544924f55852f8 /src/anastasis/anastasis-gtk_action.c | |
parent | ba92d27e5901f5063439914fbce99543cce74238 (diff) | |
download | anastasis-gtk-fa99c50d3346c47793aa463656ff1d8ad86354ca.tar.gz anastasis-gtk-fa99c50d3346c47793aa463656ff1d8ad86354ca.tar.bz2 anastasis-gtk-fa99c50d3346c47793aa463656ff1d8ad86354ca.zip |
allow providers to be enabled/disabled (fixes #6918)
Diffstat (limited to 'src/anastasis/anastasis-gtk_action.c')
-rw-r--r-- | src/anastasis/anastasis-gtk_action.c | 16 |
1 files changed, 12 insertions, 4 deletions
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) |