gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-anastasis-gtk] branch master updated (896615f -> 468bb98)


From: gnunet
Subject: [taler-anastasis-gtk] branch master updated (896615f -> 468bb98)
Date: Wed, 13 Apr 2022 09:25:12 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a change to branch master
in repository anastasis-gtk.

    from 896615f  -link to bug
     new a29a8e6  -rename fest for #7045
     new 468bb98  implement changes for #7222

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/anastasis/anastasis-gtk_action.c               | 20 +++++------
 src/anastasis/anastasis-gtk_handle-add-provider.c  |  4 +--
 ...astasis-gtk_handle-auth-edit-provider-clicked.c | 40 ++++++++++++----------
 src/testing/test_anastasis_reducer_1.conf          |  2 +-
 src/testing/test_anastasis_reducer_2.conf          |  2 +-
 src/testing/test_anastasis_reducer_3.conf          |  2 +-
 src/testing/test_anastasis_reducer_4.conf          |  2 +-
 7 files changed, 37 insertions(+), 35 deletions(-)

diff --git a/src/anastasis/anastasis-gtk_action.c 
b/src/anastasis/anastasis-gtk_action.c
index efca017..c13885a 100644
--- a/src/anastasis/anastasis-gtk_action.c
+++ b/src/anastasis/anastasis-gtk_action.c
@@ -720,9 +720,11 @@ action_authentications_editing (void)
     {
       uint32_t ec = 0;
       uint32_t hc = 0;
-      bool disabled = false;
+      const char *status;
       json_t *methods = NULL;
       struct GNUNET_JSON_Specification spec[] = {
+        GNUNET_JSON_spec_string ("status",
+                                 &status),
         GNUNET_JSON_spec_mark_optional (
           GNUNET_JSON_spec_uint32 ("error_code",
                                    &ec),
@@ -735,11 +737,6 @@ action_authentications_editing (void)
           GNUNET_JSON_spec_uint32 ("http_status",
                                    &hc),
           NULL),
-        GNUNET_JSON_spec_mark_optional (
-          GNUNET_JSON_spec_bool ("disabled",
-                                 &disabled),
-          NULL),
-
         GNUNET_JSON_spec_end ()
       };
 
@@ -751,7 +748,8 @@ action_authentications_editing (void)
         GNUNET_break (0);
         continue;
       }
-      if (disabled)
+      if (0 == strcmp (status,
+                       "disabled"))
         continue;
       switch (hc)
       {
@@ -2093,12 +2091,12 @@ long_poll_providers_action_cb (void *cls,
   GNUNET_assert (NULL != ap);
   json_object_foreach (ap, url, obj)
   {
-    struct ANASTASIS_CRYPTO_ProviderSaltP salt;
+    struct ANASTASIS_CRYPTO_ProviderSaltP provider_salt;
 
     if (GNUNET_OK ==
         ANASTASIS_reducer_lookup_salt (AG_redux_state,
                                        url,
-                                       &salt))
+                                       &provider_salt))
       continue;
     GNUNET_log (GNUNET_ERROR_TYPE_INFO,
                 "Expanding policy discovery to recently discovered live 
provider `%s'\n",
@@ -2135,12 +2133,12 @@ begin_discovery (void)
                         "authentication_providers");
   json_object_foreach (ap, url, obj)
   {
-    struct ANASTASIS_CRYPTO_ProviderSaltP salt;
+    struct ANASTASIS_CRYPTO_ProviderSaltP provider_salt;
     enum GNUNET_GenericReturnValue ret;
 
     ret = ANASTASIS_reducer_lookup_salt (AG_redux_state,
                                          url,
-                                         &salt);
+                                         &provider_salt);
     switch (ret)
     {
     case GNUNET_OK:
diff --git a/src/anastasis/anastasis-gtk_handle-add-provider.c 
b/src/anastasis/anastasis-gtk_handle-add-provider.c
index ae85b46..37413d9 100644
--- a/src/anastasis/anastasis-gtk_handle-add-provider.c
+++ b/src/anastasis/anastasis-gtk_handle-add-provider.c
@@ -113,8 +113,8 @@ config_cb (void *cls,
                              acfg->business_name),
     GNUNET_JSON_pack_uint64 ("storage_limit_in_megabytes",
                              acfg->storage_limit_in_megabytes),
-    GNUNET_JSON_pack_data_auto ("salt",
-                                &acfg->salt),
+    GNUNET_JSON_pack_data_auto ("provider_salt",
+                                &acfg->provider_salt),
     GNUNET_JSON_pack_uint64 ("http_status",
                              http_status));
   button = GTK_WIDGET (gtk_builder_get_object (builder,
diff --git a/src/anastasis/anastasis-gtk_handle-auth-edit-provider-clicked.c 
b/src/anastasis/anastasis-gtk_handle-auth-edit-provider-clicked.c
index 1c0ddb1..091b1fb 100644
--- a/src/anastasis/anastasis-gtk_handle-auth-edit-provider-clicked.c
+++ b/src/anastasis/anastasis-gtk_handle-auth-edit-provider-clicked.c
@@ -396,8 +396,10 @@ edit_provider_dialog_response_cb (GtkDialog *dialog,
                        args,
                        url,
                        GNUNET_JSON_PACK (
-                         GNUNET_JSON_pack_bool ("disabled",
-                                                ! enabled))));
+                         GNUNET_JSON_pack_string ("status",
+                                                  enabled
+                                                  ? "not-contacted"
+                                                  : "disabled"))));
       g_free (url);
     }
     while (gtk_tree_model_iter_next (tm,
@@ -448,9 +450,11 @@ anastasis_gtk_edit_provider_list_clicked_cb (GtkButton 
*object,
       uint32_t http_code = 0;
       uint32_t ec = TALER_EC_NONE;
       struct TALER_Amount ll;
-      bool disabled = false;
+      const char *status;
       const char *name = NULL;
       struct GNUNET_JSON_Specification spec[] = {
+        GNUNET_JSON_spec_string ("status",
+                                 &status),
         GNUNET_JSON_spec_mark_optional (
           GNUNET_JSON_spec_uint32 ("http_status",
                                    &http_code),
@@ -459,10 +463,6 @@ anastasis_gtk_edit_provider_list_clicked_cb (GtkButton 
*object,
           GNUNET_JSON_spec_string ("business_name",
                                    &name),
           NULL),
-        GNUNET_JSON_spec_mark_optional (
-          GNUNET_JSON_spec_bool ("disabled",
-                                 &disabled),
-          NULL),
         GNUNET_JSON_spec_mark_optional (
           TALER_JSON_spec_amount_any ("liability_limit",
                                       &ll),
@@ -473,7 +473,7 @@ anastasis_gtk_edit_provider_list_clicked_cb (GtkButton 
*object,
           NULL),
         GNUNET_JSON_spec_end ()
       };
-      char *status;
+      char *status_str;
       const char *color;
       bool sensitive = false;
       const char *ll_s = NULL;
@@ -493,9 +493,10 @@ anastasis_gtk_edit_provider_list_clicked_cb (GtkButton 
*object,
         continue;
       }
       if ( (MHD_HTTP_OK == http_code) &&
-           (! disabled) )
+           (0 != strcmp (status,
+                         "disabled")) )
       {
-        status = GNUNET_strdup (_ ("available"));
+        status_str = GNUNET_strdup (_ ("available"));
         color = "green";
         sensitive = true;
         if (GNUNET_OK ==
@@ -505,24 +506,26 @@ anastasis_gtk_edit_provider_list_clicked_cb (GtkButton 
*object,
           GNUNET_break (0);
       }
       else if ( (0 == http_code) &&
-                (! disabled) )
+                (0 != strcmp (status,
+                              "disabled")) )
       {
-        GNUNET_asprintf (&status,
+        GNUNET_asprintf (&status_str,
                          _ ("Network failure: %s (#%u)"),
                          TALER_ErrorCode_get_hint (ec),
                          (unsigned int) ec);
         color = "red";
       }
-      else if (disabled)
+      else if (0 == strcmp (status,
+                            "disabled"))
       {
-        GNUNET_asprintf (&status,
+        GNUNET_asprintf (&status_str,
                          _ ("disabled"));
         color = "blue";
         sensitive = true;
       }
       else
       {
-        GNUNET_asprintf (&status,
+        GNUNET_asprintf (&status_str,
                          _ ("HTTP %s (%u): %s (#%u)"),
                          MHD_get_reason_phrase_for (http_code),
                          (unsigned int) http_code,
@@ -537,15 +540,16 @@ anastasis_gtk_edit_provider_list_clicked_cb (GtkButton 
*object,
         NULL,
         -1,
         AG_PMC_PROVIDER_URL, url,
-        AG_PMC_PROVIDER_STATUS, status,
+        AG_PMC_PROVIDER_STATUS, status_str,
         AG_PMC_PROVIDER_STATUS_COLOR, color,
         AG_PMC_PROVIDER_LIABILITY_LIMIT, ll_s,
-        AG_PMC_PROVIDER_ENABLED, ! disabled,
+        AG_PMC_PROVIDER_ENABLED, (0 != strcmp (status,
+                                               "disabled")),
         AG_PMC_PROVIDER_SENSITIVE, sensitive,
         AG_PMC_PROVIDER_NOT_SENSITIVE, ! sensitive,
         AG_PMC_PROVIDER_NAME, name,
         -1);
-      GNUNET_free (status);
+      GNUNET_free (status_str);
     }
   }
   ad = GTK_WIDGET (gtk_builder_get_object (builder,
diff --git a/src/testing/test_anastasis_reducer_1.conf 
b/src/testing/test_anastasis_reducer_1.conf
index 25b001e..a6b50cd 100644
--- a/src/testing/test_anastasis_reducer_1.conf
+++ b/src/testing/test_anastasis_reducer_1.conf
@@ -2,7 +2,7 @@
 
 [anastasis]
 PORT = 8086
-SERVER_SALT = AUfO1KGOKYIFlFQ1
+PROVIDER_SALT = AUfO1KGOKYIFlFQ1
 BUSINESS_NAME = "Data loss #1 Inc."
 
 [stasis-postgres]
diff --git a/src/testing/test_anastasis_reducer_2.conf 
b/src/testing/test_anastasis_reducer_2.conf
index 48f7dd7..e10d66c 100644
--- a/src/testing/test_anastasis_reducer_2.conf
+++ b/src/testing/test_anastasis_reducer_2.conf
@@ -2,7 +2,7 @@
 
 [anastasis]
 PORT = 8087
-SERVER_SALT = BUfO1KGOKYIFlFQ2
+PROVIDER_SALT = BUfO1KGOKYIFlFQ2
 BUSINESS_NAME = "Data loss #2 Inc."
 
 [stasis-postgres]
diff --git a/src/testing/test_anastasis_reducer_3.conf 
b/src/testing/test_anastasis_reducer_3.conf
index fdfbada..86d18d8 100644
--- a/src/testing/test_anastasis_reducer_3.conf
+++ b/src/testing/test_anastasis_reducer_3.conf
@@ -2,7 +2,7 @@
 
 [anastasis]
 PORT = 8088
-SERVER_SALT = CUfO1KGOKYIFlFQ3
+PROVIDER_SALT = CUfO1KGOKYIFlFQ3
 BUSINESS_NAME = "Data loss #3 Inc."
 
 [stasis-postgres]
diff --git a/src/testing/test_anastasis_reducer_4.conf 
b/src/testing/test_anastasis_reducer_4.conf
index ad113ff..caf5da2 100644
--- a/src/testing/test_anastasis_reducer_4.conf
+++ b/src/testing/test_anastasis_reducer_4.conf
@@ -2,7 +2,7 @@
 
 [anastasis]
 PORT = 8089
-SERVER_SALT = DUfO1KGOKYIFlFQ4
+PROVIDER_SALT = DUfO1KGOKYIFlFQ4
 BUSINESS_NAME = "Data loss #4 Inc."
 
 ANNUAL_FEE = TESTKUDOS:0.01

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]