gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] 02/13: deleted salt cb etc. from anastasis.c


From: gnunet
Subject: [taler-anastasis] 02/13: deleted salt cb etc. from anastasis.c
Date: Sun, 03 May 2020 18:02:26 +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 06095a17fd592e9ca621bbe56fa9b985343f9def
Author: Dennis Neufeld <address@hidden>
AuthorDate: Fri May 1 18:02:25 2020 +0000

    deleted salt cb etc. from anastasis.c
---
 src/lib/anastasis.c | 115 +---------------------------------------------------
 1 file changed, 2 insertions(+), 113 deletions(-)

diff --git a/src/lib/anastasis.c b/src/lib/anastasis.c
index 1d98ceb..78a4d0e 100644
--- a/src/lib/anastasis.c
+++ b/src/lib/anastasis.c
@@ -24,98 +24,6 @@
 #include <taler/taler_json_lib.h>
 #include <gnunet/gnunet_util_lib.h>
 
-
-/**
- * FIXME: Needed?
- * 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?
- * 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?
- * 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);
-}
-
-
 /**
  * Challenge struct contains the UUID's needed for the recovery process and a 
reference to
  * ANASTASIS_Recovery.
@@ -768,7 +676,6 @@ ANASTASIS_truth_upload (struct GNUNET_CURL_Context *ctx,
 
   tu = GNUNET_new (struct ANASTASIS_TruthUpload);
   t = GNUNET_new (struct ANASTASIS_Truth);
-  // ss = GNUNET_new (struct SaltState); FIXME: Needed?
   tu->tc_cls = tc_cls;
   tu->tpc_cls = tpc_cls;
   tu->tpc = tpc;
@@ -780,25 +687,8 @@ ANASTASIS_truth_upload (struct GNUNET_CURL_Context *ctx,
   t->mime_type = mime_type;
   uuid_generate (t->uuid);
 
-  /*
-  FIXME: Needed?
-  ss->http_status = MHD_HTTP_OK;
-  ss->so = ANASTASIS_salt (tu->ctx,
-                           provider_url,
-                           &salt_cb,
-                           ss);
-  */
-
-  if (NULL == id_data)
-  {
-    GNUNET_break (0);
-    return;
-  }
-
-  if (NULL == ss->salt)
-  {
-
-  }
+  GNUNET_assert (NULL != id_data);
+  GNUNET_assert (NULL != salt);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "At %s:%d server salt is %s-%llu b\n", __FILE__, __LINE__,
               TALER_B2S (salt),
@@ -859,7 +749,6 @@ ANASTASIS_truth_upload (struct GNUNET_CURL_Context *ctx,
                                    tu->paid_order_id,
                                    &truth_store_callback,
                                    tu);
-  // salt_cleanup (ss); FIXME: Needed?
   // SETUP TRUTH CALLBACK
   tu->tc = tc;
   tu->tc_cls = tc_cls;

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

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