gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] branch master updated: fix back transition


From: gnunet
Subject: [taler-anastasis] branch master updated: fix back transition
Date: Wed, 10 Mar 2021 11:49:27 +0100

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

grothoff pushed a commit to branch master
in repository anastasis.

The following commit(s) were added to refs/heads/master by this push:
     new 4595f90  fix back transition
4595f90 is described below

commit 4595f90d6726e472269303b2e94c97efe14a3c1d
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Mar 10 11:49:25 2021 +0100

    fix back transition
---
 src/reducer/anastasis_api_redux.c | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/src/reducer/anastasis_api_redux.c 
b/src/reducer/anastasis_api_redux.c
index f27aacf..fe68630 100644
--- a/src/reducer/anastasis_api_redux.c
+++ b/src/reducer/anastasis_api_redux.c
@@ -1385,7 +1385,6 @@ ANASTASIS_back_generic_decrement_ (json_t *state,
                                    ANASTASIS_ActionCallback cb,
                                    void *cb_cls)
 {
-  enum ANASTASIS_BackupState state_index;
   const char *s_mode = get_state_mode (state);
   const char *state_string = json_string_value (json_object_get (state,
                                                                  s_mode));
@@ -1395,19 +1394,32 @@ ANASTASIS_back_generic_decrement_ (json_t *state,
   if (0 == strcmp ("backup_state",
                    s_mode))
   {
+    enum ANASTASIS_BackupState state_index;
+
     state_index = ANASTASIS_backup_state_from_string_ (state_string);
     GNUNET_assert (state_index > 0);
     state_index = state_index - 1;
-    redux_transition (state,
-                      state_index);
+
+    GNUNET_assert (0 ==
+                   json_object_set_new (
+                     state,
+                     s_mode,
+                     json_string (
+                       ANASTASIS_backup_state_to_string_ (state_index))));
   }
   else
   {
+    enum ANASTASIS_RecoveryState state_index;
+
     state_index = ANASTASIS_recovery_state_from_string_ (state_string);
     GNUNET_assert (state_index > 0);
     state_index = state_index - 1;
-    redux_transition (state,
-                      state_index);
+    GNUNET_assert (0 ==
+                   json_object_set_new (
+                     state,
+                     s_mode,
+                     json_string (
+                       ANASTASIS_recovery_state_to_string_ (state_index))));
   }
   cb (cb_cls,
       TALER_EC_NONE,

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