gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: -fix melt FTBFS


From: gnunet
Subject: [taler-exchange] branch master updated: -fix melt FTBFS
Date: Sun, 06 Feb 2022 18:35:13 +0100

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

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 57bbdb09 -fix melt FTBFS
57bbdb09 is described below

commit 57bbdb0997643a53615b8ebff11f22a4d6783d66
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Feb 6 18:35:08 2022 +0100

    -fix melt FTBFS
---
 src/lib/exchange_api_melt.c   | 25 ++++++++++++++++++-------
 src/lib/exchange_api_recoup.c |  1 +
 2 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/src/lib/exchange_api_melt.c b/src/lib/exchange_api_melt.c
index a123248a..149ab72a 100644
--- a/src/lib/exchange_api_melt.c
+++ b/src/lib/exchange_api_melt.c
@@ -91,6 +91,11 @@ struct TALER_EXCHANGE_MeltHandle
    */
   struct TALER_ExchangeWithdrawValues *alg_values;
 
+  /**
+   * Handle for the preflight request, or NULL.
+   */
+  struct TALER_EXCHANGE_CsRHandle *csr;
+
   /**
    * Public key of the coin being melted.
    */
@@ -617,10 +622,11 @@ TALER_EXCHANGE_melt (struct TALER_EXCHANGE_Handle 
*exchange,
                      TALER_EXCHANGE_MeltCallback melt_cb,
                      void *melt_cb_cls)
 {
-  const struct TALER_EXCHANGE_NonceKey *nks[GNUNET_NZL (rd->refresh_pks_len)];
+  struct TALER_EXCHANGE_NonceKey nks[GNUNET_NZL (rd->fresh_pks_len)];
   unsigned int nks_off = 0;
+  struct TALER_EXCHANGE_MeltHandle *mh;
 
-  if (0 == rd->refresh_pks_len)
+  if (0 == rd->fresh_pks_len)
   {
     GNUNET_break (0);
     return NULL;
@@ -633,14 +639,14 @@ TALER_EXCHANGE_melt (struct TALER_EXCHANGE_Handle 
*exchange,
   mh->ps = ps;
   mh->melt_cb = melt_cb;
   mh->melt_cb_cls = melt_cb_cls;
-  mh->alg_values = GNUNET_new_array (struct TALER_ExchangeWithdrawValues,
-                                     rd->fresh_pks_len);
+  mh->alg_values = GNUNET_new_array (rd->fresh_pks_len,
+                                     struct TALER_ExchangeWithdrawValues);
   for (unsigned int i = 0; i<rd->fresh_pks_len; i++)
   {
     const struct TALER_EXCHANGE_DenomPublicKey *fresh_pk = &rd->fresh_pks[i];
     struct TALER_ExchangeWithdrawValues *wv = &mh->alg_values[i];
 
-    switch (fresh_pk->cipher)
+    switch (fresh_pk->key.cipher)
     {
     case TALER_DENOMINATION_INVALID:
       GNUNET_break (0);
@@ -673,7 +679,7 @@ TALER_EXCHANGE_melt (struct TALER_EXCHANGE_Handle *exchange,
     if (NULL == mh->csr)
     {
       GNUNET_break (0);
-      TALER_EXCHANGE_melt_cancel (mh->csr);
+      TALER_EXCHANGE_melt_cancel (mh);
       return NULL;
     }
     return mh;
@@ -682,7 +688,7 @@ TALER_EXCHANGE_melt (struct TALER_EXCHANGE_Handle *exchange,
       start_melt (mh))
   {
     GNUNET_break (0);
-    TALER_EXCHANGE_melt_cancel (mh->csr);
+    TALER_EXCHANGE_melt_cancel (mh);
     return NULL;
   }
   return mh;
@@ -697,6 +703,11 @@ TALER_EXCHANGE_melt_cancel (struct 
TALER_EXCHANGE_MeltHandle *mh)
     GNUNET_CURL_job_cancel (mh->job);
     mh->job = NULL;
   }
+  if (NULL != mh->csr)
+  {
+    TALER_EXCHANGE_csr_cancel (mh->csr);
+    mh->csr = NULL;
+  }
   TALER_EXCHANGE_free_melt_data_ (&mh->md); /* does not free 'md' itself */
   GNUNET_free (mh->url);
   TALER_curl_easy_post_finished (&mh->ctx);
diff --git a/src/lib/exchange_api_recoup.c b/src/lib/exchange_api_recoup.c
index 10f74ce6..4a7ac75e 100644
--- a/src/lib/exchange_api_recoup.c
+++ b/src/lib/exchange_api_recoup.c
@@ -284,6 +284,7 @@ struct TALER_EXCHANGE_RecoupHandle *
 TALER_EXCHANGE_recoup (struct TALER_EXCHANGE_Handle *exchange,
                        const struct TALER_EXCHANGE_DenomPublicKey *pk,
                        const struct TALER_DenominationSignature *denom_sig,
+                       const struct TALER_ExchangeWithdrawValues 
*exchange_vals,
                        const struct TALER_PlanchetSecretsP *ps,
                        TALER_EXCHANGE_RecoupResultCallback recoup_cb,
                        void *recoup_cb_cls)

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