gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] 02/07: fix


From: gnunet
Subject: [taler-anastasis] 02/07: fix
Date: Thu, 26 Nov 2020 12:54:09 +0100

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

dennis-neufeld pushed a commit to branch master
in repository anastasis.

commit 25da8a00879e049b9a1651adb83dbed642127a81
Author: Dennis Neufeld <dennis.neufeld@students.bfh.ch>
AuthorDate: Tue Nov 24 16:21:22 2020 +0100

    fix
---
 src/lib/anastasis_api_backup_redux.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/lib/anastasis_api_backup_redux.c 
b/src/lib/anastasis_api_backup_redux.c
index 845358d..4225f7c 100644
--- a/src/lib/anastasis_api_backup_redux.c
+++ b/src/lib/anastasis_api_backup_redux.c
@@ -1191,21 +1191,21 @@ initialize_policies (json_t *state)
   GNUNET_assert (json_is_array (json_policies));
   json_array_foreach (json_policies, index, json_policy)
   {
-    struct ANASTASIS_Truth *truths;
     unsigned int truth_length;
     size_t auth_method_index;
     json_t *auth_method;
+    json_t*auth_method_arr = json_object_get (json_policy,
+                                              "methods");
+    const struct ANASTASIS_Truth *truths[json_array_size (auth_method_arr)];
 
-    json_array_foreach (json_object_get (json_policy, "methods"),
+    json_array_foreach (auth_method_arr,
                         auth_method_index,
                         auth_method)
     {
       unsigned int truth_index = json_integer_value (json_object_get (
                                                        auth_method,
                                                        "auth_method_index"));
-      GNUNET_array_append (truths,
-                           truth_length,
-                           tus_arr[truth_index].truth);
+      truths[truth_index] = tus_arr[truth_index].truth;
     }
     struct ANASTASIS_Policy *policy = ANASTASIS_policy_create (truths,
                                                                truth_length);
@@ -1329,7 +1329,7 @@ upload_rec_documents (json_t *state,
   {
     initialize_policies (state);
   }
-  struct SecretShareState *sss = cls;
+  struct SecretShareState *sss = GNUNET_new (struct SecretShareState);
   GNUNET_assert (0 ==
                  (sss->id_data = json_object_get (state,
                                                   "identity_attributes")));
@@ -1421,7 +1421,7 @@ truth_upload_cb (void *cls,
   {
     // try uploading recovery document
     GNUNET_assert (0 ==
-                   json_object_set (state,
+                   json_object_set (tus->state,
                                     "recovery_document_uploads",
                                     json_array ()));
 

-- 
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]