diff options
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) | |||
708 | { | 708 | { |
709 | uint32_t ec = 0; | 709 | uint32_t ec = 0; |
710 | uint32_t hc = 0; | 710 | uint32_t hc = 0; |
711 | json_t *methods; | 711 | bool disabled = false; |
712 | json_t *methods = NULL; | ||
712 | struct GNUNET_JSON_Specification spec[] = { | 713 | struct GNUNET_JSON_Specification spec[] = { |
713 | GNUNET_JSON_spec_mark_optional ( | 714 | GNUNET_JSON_spec_mark_optional ( |
714 | GNUNET_JSON_spec_uint32 ("error_code", | 715 | GNUNET_JSON_spec_uint32 ("error_code", |
@@ -716,8 +717,13 @@ action_authentications_editing (void) | |||
716 | GNUNET_JSON_spec_mark_optional ( | 717 | GNUNET_JSON_spec_mark_optional ( |
717 | GNUNET_JSON_spec_json ("methods", | 718 | GNUNET_JSON_spec_json ("methods", |
718 | &methods)), | 719 | &methods)), |
719 | GNUNET_JSON_spec_uint32 ("http_status", | 720 | GNUNET_JSON_spec_mark_optional ( |
720 | &hc), | 721 | GNUNET_JSON_spec_uint32 ("http_status", |
722 | &hc)), | ||
723 | GNUNET_JSON_spec_mark_optional ( | ||
724 | GNUNET_JSON_spec_bool ("disabled", | ||
725 | &disabled)), | ||
726 | |||
721 | GNUNET_JSON_spec_end () | 727 | GNUNET_JSON_spec_end () |
722 | }; | 728 | }; |
723 | 729 | ||
@@ -729,6 +735,8 @@ action_authentications_editing (void) | |||
729 | GNUNET_break (0); | 735 | GNUNET_break (0); |
730 | continue; | 736 | continue; |
731 | } | 737 | } |
738 | if (disabled) | ||
739 | continue; | ||
732 | switch (hc) | 740 | switch (hc) |
733 | { | 741 | { |
734 | case MHD_HTTP_OK: | 742 | case MHD_HTTP_OK: |
@@ -820,7 +828,7 @@ action_authentications_editing (void) | |||
820 | * @param[out] method_cost cost to return | 828 | * @param[out] method_cost cost to return |
821 | * @return #GNUNET_OK on success | 829 | * @return #GNUNET_OK on success |
822 | */ | 830 | */ |
823 | static int | 831 | static enum GNUNET_GenericReturnValue |
824 | lookup_recovery_cost (const char *provider, | 832 | lookup_recovery_cost (const char *provider, |
825 | const char *type, | 833 | const char *type, |
826 | struct TALER_Amount *method_cost) | 834 | struct TALER_Amount *method_cost) |