gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] 03/06: deleted unused functions


From: gnunet
Subject: [taler-anastasis] 03/06: deleted unused functions
Date: Sun, 05 Jul 2020 19:13:17 +0200

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

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

commit 6cb82fd78531f38e9e6baae75178a2e51d713423
Author: Dennis Neufeld <dennis.neufeld@students.bfh.ch>
AuthorDate: Sun Jul 5 15:54:20 2020 +0000

    deleted unused functions
---
 src/lib/anastasis.c | 94 ++---------------------------------------------------
 1 file changed, 2 insertions(+), 92 deletions(-)

diff --git a/src/lib/anastasis.c b/src/lib/anastasis.c
index d2a8bb3..5dcd8ac 100644
--- a/src/lib/anastasis.c
+++ b/src/lib/anastasis.c
@@ -24,96 +24,6 @@
 #include <taler/taler_json_lib.h>
 #include <gnunet/gnunet_util_lib.h>
 
-/**
- * FIXME: Needed? -> maybe needed in ANASTASIS_secret_share()
- * State for a "salt" CMD.
- */
-struct SaltState
-{
-  /**
-  * URL of the anastasis backend.
-  */
-  const char *anastasis_url;
-
-  /**
-   * Expected status code.
-   */
-  unsigned int http_status;
-
-  /**
-   * The /salt GET operation handle.
-   */
-  struct ANASTASIS_SaltOperation *so;
-
-  /**
-   * Server Salt
-   */
-  const struct ANASTASIS_CRYPTO_SaltP *salt;
-};
-
-
-/**
- * FIXME: Needed? -> maybe needed in ANASTASIS_secret_share()
- * Function called with the results of a #ANASTASIS_salt().
- *
- * @param cls closure
- * @param http_status HTTP status of the request
- * @param salt salt from the server
- */
-static void
-salt_cb (void *cls,
-         unsigned int http_status,
-         const struct ANASTASIS_CRYPTO_SaltP *salt)
-{
-  struct SaltState *ss = cls;
-
-  ss->so = NULL;
-
-  if (http_status != ss->http_status)
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u in %s:%u\n",
-                http_status,
-                __FILE__,
-                __LINE__);
-    GNUNET_break (0);
-    return;
-  }
-  if (NULL == salt)
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Salt is NULL in %s:%u\n",
-                __FILE__,
-                __LINE__);
-    GNUNET_break (0);
-    return;
-  }
-
-  ss->salt = salt;
-}
-
-
-/**
- * FIXME: Needed? -> maybe needed in ANASTASIS_secret_share()
- * Free the state of a "salt" CMD, and possibly
- * cancel it if it did not complete.
- *
- * @param cls closure.
- * @param cmd command being freed.
- */
-static void
-salt_cleanup (struct SaltState *ss)
-{
-  if (NULL != ss->so)
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-                "Salt request did not complete\n");
-    ANASTASIS_salt_cancel (ss->so);
-    ss->so = NULL;
-  }
-  GNUNET_free (ss);
-}
-
 
 /**
  * stores provider URLs, identity key material, decrypted recovery document 
(internally!)
@@ -1712,7 +1622,7 @@ ANASTASIS_secret_share (struct GNUNET_CURL_Context *ctx,
                 "At %s:%d pss_length is %d!\n", __FILE__, __LINE__,
                 pss_length);
     GNUNET_break (0);
-    return;
+    return NULL;
   }
 
   ss = GNUNET_new (struct ANASTASIS_SecretShare);
@@ -1917,7 +1827,7 @@ ANASTASIS_secret_share (struct GNUNET_CURL_Context *ctx,
   }
 
   recovery_document = json_pack (
-    "{s:o," /* decryption policie */
+    "{s:o," /* decryption policies */
     " s:o," /* escrow methods */
     " s:o}", /* encrypted core secret */
     "policies", dec_policies,

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