gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] 07/15: handle fail of fetching recovery information


From: gnunet
Subject: [taler-anastasis] 07/15: handle fail of fetching recovery information
Date: Sun, 31 Jan 2021 17:06:13 +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 88291a3c739870da2e6869880261fe4a8eec0b4a
Author: Dennis Neufeld <dennis.neufeld@students.bfh.ch>
AuthorDate: Mon Jan 18 19:45:07 2021 +0100

    handle fail of fetching recovery information
---
 src/lib/anastasis_api_redux.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/lib/anastasis_api_redux.c b/src/lib/anastasis_api_redux.c
index 58f2da9..bc528be 100644
--- a/src/lib/anastasis_api_redux.c
+++ b/src/lib/anastasis_api_redux.c
@@ -1019,7 +1019,7 @@ policy_lookup_cb (void *cls,
       for (unsigned int k = 0; k < rss->challenges_length; k++)
       {
         if (0 == memcmp (&rss->ri->dps[i].nonces[j],
-                         rss->challenges[k].nonce,
+                         &rss->challenges[k].nonce,
                          sizeof (struct ANASTASIS_CRYPTO_NonceP)))
           GNUNET_assert (
             0 == json_array_append (policy,
@@ -1053,13 +1053,17 @@ policy_lookup_cb (void *cls,
   }
   else
   {
-    // FIXME: Error message if operation above failed (policies, challenges 
missing)
+    json_t *error
+      = json_pack ("{s:I, s:s}",
+                   "code",
+                   (json_int_t) ANASTASIS_EC_INVALID,
+                   "hint",
+                   "Failed fetching recovery information!");
+    // FIXME: Error code if operation above failed (policies, challenges 
missing)
     rss->cb (NULL,
              ANASTASIS_EC_INVALID,
-             rss->state);
-    rss->cb = NULL;
+             error);
   }
-
   rss->recovery = NULL;
 }
 

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