gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-merchant] branch master updated (64d9a74 -> 36ceb87)


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] branch master updated (64d9a74 -> 36ceb87)
Date: Tue, 18 Jun 2019 14:54:10 +0200

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

grothoff pushed a change to branch master
in repository merchant.

    from 64d9a74  Moving code.
     new 0159d1a  fix misc style bugs and one real one
     new 36ceb87  fix memory leaks

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/backend/taler-merchant-httpd.c                 |  19 ++--
 src/backend/taler-merchant-httpd_pay.c             |   4 +-
 src/backend/taler-merchant-httpd_proposal.c        |  35 +++----
 src/backend/taler-merchant-httpd_tip-query.c       |   3 +-
 .../taler-merchant-httpd_track-transaction.c       |   3 +-
 src/backend/taler-merchant-httpd_track-transfer.c  |   2 +-
 src/lib/merchant_api_pay.c                         |  27 +++---
 src/lib/merchant_api_proposal.c                    |   2 +-
 src/lib/merchant_api_refund.c                      |  12 +--
 src/lib/merchant_api_tip_authorize.c               |   2 +-
 src/lib/merchant_api_tip_pickup.c                  |   6 +-
 src/lib/testing_api_cmd_history.c                  |  48 +++++-----
 src/lib/testing_api_cmd_pay.c                      | 104 +++++++++++----------
 src/lib/testing_api_cmd_proposal.c                 |  14 +--
 src/lib/testing_api_cmd_refund.c                   |  18 ++--
 src/lib/testing_api_cmd_tip.c                      |  95 ++++++++++++-------
 src/lib/testing_api_cmd_track.c                    |   4 +-
 17 files changed, 219 insertions(+), 179 deletions(-)

diff --git a/src/backend/taler-merchant-httpd.c 
b/src/backend/taler-merchant-httpd.c
index 50b80cd..a1397ed 100644
--- a/src/backend/taler-merchant-httpd.c
+++ b/src/backend/taler-merchant-httpd.c
@@ -224,6 +224,9 @@ url_handler (void *cls,
       { "/", MHD_HTTP_METHOD_GET, "text/plain",
         "Hello, I'm a merchant's Taler backend. This HTTP server is not for 
humans.\n", 0,
         &TMH_MHD_handler_static_response, MHD_HTTP_OK },
+      { "/agpl", MHD_HTTP_METHOD_GET, "text/plain",
+        NULL, 0,
+        &TMH_MHD_handler_agpl_redirect, MHD_HTTP_FOUND },
       { "/public/pay", MHD_HTTP_METHOD_POST, "application/json",
         NULL, 0,
         &MH_handler_pay, MHD_HTTP_OK },
@@ -693,7 +696,7 @@ wireformat_iterator_cb (void *cls,
   struct TALER_WIRE_Plugin *plugin;
   json_t *j;
   enum TALER_ErrorCode ec;
-  struct GNUNET_HashCode h_wire;
+  struct GNUNET_HashCode jh_wire;
   char *wire_file_mode;
 
   if (0 != strncasecmp (section,
@@ -893,7 +896,7 @@ wireformat_iterator_cb (void *cls,
 
   if (GNUNET_OK !=
       TALER_JSON_merchant_wire_signature_hash (j,
-                                               &h_wire))
+                                               &jh_wire))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                 "Failed to hash wire input\n");
@@ -925,7 +928,7 @@ wireformat_iterator_cb (void *cls,
                                       wm);
 
   wm->j_wire = j;
-  wm->h_wire = h_wire;
+  wm->h_wire = jh_wire;
 }
 
 
@@ -993,7 +996,7 @@ instances_iterator_cb (void *cls,
                                              &mi->tip_exchange))
   {
     char *tip_reserves;
-    struct GNUNET_CRYPTO_EddsaPrivateKey *pk;
+    struct GNUNET_CRYPTO_EddsaPrivateKey *tip_pk;
 
     if (GNUNET_OK !=
         GNUNET_CONFIGURATION_get_value_filename (iic->config,
@@ -1010,8 +1013,8 @@ instances_iterator_cb (void *cls,
       iic->ret = GNUNET_SYSERR;
       return;
     }
-    pk = GNUNET_CRYPTO_eddsa_key_create_from_file (tip_reserves);
-    if (NULL == pk)
+    tip_pk = GNUNET_CRYPTO_eddsa_key_create_from_file (tip_reserves);
+    if (NULL == tip_pk)
     {
       GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR,
                                  section,
@@ -1024,8 +1027,8 @@ instances_iterator_cb (void *cls,
       iic->ret = GNUNET_SYSERR;
       return;
     }
-    mi->tip_reserve.eddsa_priv = *pk;
-    GNUNET_free (pk);
+    mi->tip_reserve.eddsa_priv = *tip_pk;
+    GNUNET_free (tip_pk);
     GNUNET_free (tip_reserves);
   }
 
diff --git a/src/backend/taler-merchant-httpd_pay.c 
b/src/backend/taler-merchant-httpd_pay.c
index 2764a0c..227497f 100644
--- a/src/backend/taler-merchant-httpd_pay.c
+++ b/src/backend/taler-merchant-httpd_pay.c
@@ -1657,7 +1657,7 @@ parse_pay (struct MHD_Connection *connection,
   {
     struct DepositConfirmation *dc = &pc->dc[coins_index];
     const char *exchange_url;
-    struct GNUNET_JSON_Specification spec[] = {
+    struct GNUNET_JSON_Specification ispec[] = {
       TALER_JSON_spec_denomination_public_key ("denom_pub",
                                               &dc->denom),
       TALER_JSON_spec_amount ("contribution",
@@ -1675,7 +1675,7 @@ parse_pay (struct MHD_Connection *connection,
 
     res = TMH_PARSE_json_data (connection,
                                coin,
-                               spec);
+                               ispec);
     if (GNUNET_YES != res)
     {
       GNUNET_JSON_parse_free (spec);
diff --git a/src/backend/taler-merchant-httpd_proposal.c 
b/src/backend/taler-merchant-httpd_proposal.c
index a65bf46..31a0b29 100644
--- a/src/backend/taler-merchant-httpd_proposal.c
+++ b/src/backend/taler-merchant-httpd_proposal.c
@@ -63,7 +63,6 @@ check_products (json_t *products)
 {
   size_t index;
   json_t *value;
-  int res;
 
   if (! json_is_array (products))
   {
@@ -74,6 +73,7 @@ check_products (json_t *products)
     const char *description;
     const char *error_name;
     unsigned int error_line;
+    int res;
     struct GNUNET_JSON_Specification spec[] = {
       GNUNET_JSON_spec_string ("description", &description),
       /* FIXME: there are other fields in the product specification
@@ -322,9 +322,9 @@ proposal_put (struct MHD_Connection *connection,
     /* The frontend either fully specifieds the "merchant" field,
      * or just gives the backend the "instance" name and lets it
      * fill out. */
-    struct MerchantInstance *mi = TMH_lookup_instance (instance);
+    struct MerchantInstance *my_mi = TMH_lookup_instance (instance);
 
-    if (NULL == mi)
+    if (NULL == my_mi)
     {
       TALER_LOG_WARNING ("Does 'default' instance exist?\n");
       return TMH_RESPONSE_reply_not_found
@@ -344,29 +344,27 @@ proposal_put (struct MHD_Connection *connection,
       const char *mj = NULL;
       const char *ma = NULL;
       json_t *locations;
-      json_t *locj;
-      json_t *loca;
-      json_t *merchant;
       char *label;
+      json_t *jmerchant;
 
-      merchant = json_object ();
-      json_object_set_new (merchant,
+      jmerchant = json_object ();
+      json_object_set_new (jmerchant,
                            "name",
-                           json_string (mi->name));
-      json_object_set_new (merchant,
+                           json_string (my_mi->name));
+      json_object_set_new (jmerchant,
                            "instance",
                            json_string (instance));
-      json_object_set_new (order,
-                           "merchant",
-                           merchant);
       locations = json_object_get (order,
                                    "locations");
       if (NULL != locations)
       {
+        json_t *loca;
+        json_t *locj;
+
         /* Handle merchant address */
         GNUNET_assert (0 < GNUNET_asprintf (&label,
                                             "%s-address",
-                                            mi->id));
+                                            my_mi->id));
         loca = json_object_get (default_locations,
                                 label);
         if (NULL != loca)
@@ -376,7 +374,7 @@ proposal_put (struct MHD_Connection *connection,
           json_object_set_new (locations,
                                ma,
                                loca);
-          json_object_set_new (merchant,
+          json_object_set_new (jmerchant,
                                "address",
                                json_string (ma));
         }
@@ -385,7 +383,7 @@ proposal_put (struct MHD_Connection *connection,
         /* Handle merchant jurisdiction */
         GNUNET_assert (0 < GNUNET_asprintf (&label,
                                             "%s-jurisdiction",
-                                            mi->id));
+                                            my_mi->id));
         locj = json_object_get (default_locations,
                                 label);
         if (NULL != locj)
@@ -411,8 +409,11 @@ proposal_put (struct MHD_Connection *connection,
         }
         GNUNET_free (label);
       } /* have locations */
+      json_object_set_new (order,
+                           "merchant",
+                           jmerchant);
     } /* needed to synthesize merchant info */
-  } /* scope of 'mi' */
+  } /* scope of 'my_mi' */
 
   /* extract fields we need to sign separately */
   res = TMH_PARSE_json_data (connection,
diff --git a/src/backend/taler-merchant-httpd_tip-query.c 
b/src/backend/taler-merchant-httpd_tip-query.c
index b63f3d2..2b90b79 100644
--- a/src/backend/taler-merchant-httpd_tip-query.c
+++ b/src/backend/taler-merchant-httpd_tip-query.c
@@ -136,7 +136,6 @@ MH_handler_tip_query (struct TMH_RequestHandler *rh,
                       size_t *upload_data_size)
 {
   struct TipQueryContext *tqc;
-  int res;
   struct MerchantInstance *mi;
 
   if (NULL == *connection_cls)
@@ -153,6 +152,8 @@ MH_handler_tip_query (struct TMH_RequestHandler *rh,
 
   if (0 != tqc->ctr.response_code)
   {
+    int res;
+
     /* We are *done* processing the request, just queue the response (!) */
     if (UINT_MAX == tqc->ctr.response_code)
     {
diff --git a/src/backend/taler-merchant-httpd_track-transaction.c 
b/src/backend/taler-merchant-httpd_track-transaction.c
index b4b361d..14ac127 100644
--- a/src/backend/taler-merchant-httpd_track-transaction.c
+++ b/src/backend/taler-merchant-httpd_track-transaction.c
@@ -1049,7 +1049,6 @@ MH_handler_track_transaction (struct TMH_RequestHandler 
*rh,
   struct TrackTransactionContext *tctx;
   const char *order_id;
   const char *instance;
-  int ret;
   enum GNUNET_DB_QueryStatus qs;
   struct GNUNET_HashCode h_instance;
   struct json_t *contract_terms;
@@ -1070,6 +1069,8 @@ MH_handler_track_transaction (struct TMH_RequestHandler 
*rh,
 
   if (0 != tctx->response_code)
   {
+    int ret;
+
     /* We are *done* processing the request, just queue the response (!) */
     if (UINT_MAX == tctx->response_code)
     {
diff --git a/src/backend/taler-merchant-httpd_track-transfer.c 
b/src/backend/taler-merchant-httpd_track-transfer.c
index 80a22da..5481003 100644
--- a/src/backend/taler-merchant-httpd_track-transfer.c
+++ b/src/backend/taler-merchant-httpd_track-transfer.c
@@ -728,7 +728,7 @@ wire_transfer_cb (void *cls,
     }
     /* Response is consistent with the /deposit we made,
        remember it for future reference */
-    for (unsigned int i=0;i<MAX_RETRIES;i++)
+    for (unsigned int r=0;r<MAX_RETRIES;r++)
     {
       db->preflight (db->cls);
       qs = db->store_coin_to_transfer (db->cls,
diff --git a/src/lib/merchant_api_pay.c b/src/lib/merchant_api_pay.c
index e583601..a4b4baf 100644
--- a/src/lib/merchant_api_pay.c
+++ b/src/lib/merchant_api_pay.c
@@ -116,7 +116,7 @@ struct TALER_MERCHANT_Pay
  */
 static int
 check_abort_refund (struct TALER_MERCHANT_Pay *ph,
-                   const json_t *json)
+                    const json_t *json)
 {
   json_t *refunds;
   unsigned int num_refunds;
@@ -145,11 +145,11 @@ check_abort_refund (struct TALER_MERCHANT_Pay *ph,
       json_t *refund = json_array_get (refunds, i);
       struct GNUNET_JSON_Specification spec_detail[] = {
         GNUNET_JSON_spec_fixed_auto ("merchant_sig",
-                                    sig),
+                                     sig),
         GNUNET_JSON_spec_fixed_auto ("coin_pub",
-                                    &res[i].coin_pub),
-       GNUNET_JSON_spec_uint64 ("rtransaction_id",
-                                &res[i].rtransaction_id),
+                                     &res[i].coin_pub),
+        GNUNET_JSON_spec_uint64 ("rtransaction_id",
+                                 &res[i].rtransaction_id),
         GNUNET_JSON_spec_end()
       };
       struct TALER_RefundRequestPS rr;
@@ -161,7 +161,7 @@ check_abort_refund (struct TALER_MERCHANT_Pay *ph,
                              NULL, NULL))
       {
         GNUNET_break_op (0);
-       GNUNET_JSON_parse_free (spec);
+        GNUNET_JSON_parse_free (spec);
         return GNUNET_SYSERR;
       }
 
@@ -190,19 +190,19 @@ check_abort_refund (struct TALER_MERCHANT_Pay *ph,
       }
       if (-1 == found)
       {
-       GNUNET_break_op (0);
-       return GNUNET_SYSERR;
+        GNUNET_break_op (0);
+        return GNUNET_SYSERR;
       }
 
       if (GNUNET_OK !=
-         GNUNET_CRYPTO_eddsa_verify
+          GNUNET_CRYPTO_eddsa_verify
             (TALER_SIGNATURE_MERCHANT_REFUND,
             &rr.purpose,
             &sig->eddsa_sig,
             &merchant_pub.eddsa_pub))
       {
-       GNUNET_break_op (0);
-       return GNUNET_SYSERR;
+        GNUNET_break_op (0);
+        return GNUNET_SYSERR;
       }
     }
     ph->abort_cb (ph->abort_cb_cls,
@@ -363,8 +363,8 @@ handle_pay_finished (void *cls,
       if (GNUNET_OK != check_forbidden (ph,
                                        json))
       {
-       GNUNET_break_op (0);
-       response_code = 0;
+        GNUNET_break_op (0);
+        response_code = 0;
       }
       break;
     case MHD_HTTP_UNAUTHORIZED:
@@ -954,6 +954,7 @@ TALER_MERCHANT_pay_cancel (struct TALER_MERCHANT_Pay *pay)
     GNUNET_CURL_job_cancel (pay->job);
     pay->job = NULL;
   }
+  TALER_curl_easy_post_finished (&pay->post_ctx);
   GNUNET_free (pay->coins);
   GNUNET_free (pay->url);
   GNUNET_free (pay->post_ctx.json_enc);
diff --git a/src/lib/merchant_api_proposal.c b/src/lib/merchant_api_proposal.c
index 37fbc8c..3b48c50 100644
--- a/src/lib/merchant_api_proposal.c
+++ b/src/lib/merchant_api_proposal.c
@@ -447,7 +447,7 @@ TALER_MERCHANT_proposal_cancel
     po->job = NULL;
   }
   GNUNET_free (po->url);
-  GNUNET_free (po->post_ctx.json_enc);
+  TALER_curl_easy_post_finished (&po->post_ctx);
   GNUNET_free (po);
 }
 
diff --git a/src/lib/merchant_api_refund.c b/src/lib/merchant_api_refund.c
index ab95586..131ca19 100644
--- a/src/lib/merchant_api_refund.c
+++ b/src/lib/merchant_api_refund.c
@@ -145,7 +145,7 @@ handle_refund_increase_finished (void *cls,
          "error", &error,
          "code", &code,
          "hint", &hint))
-    
+
     {
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                 "/refund failed (HTTP code: %lu), backend did "
@@ -175,6 +175,7 @@ TALER_MERCHANT_refund_increase_cancel (struct 
TALER_MERCHANT_RefundIncreaseOpera
     GNUNET_CURL_job_cancel (rio->job);
     rio->job = NULL;
   }
+  TALER_curl_easy_post_finished (&rio->post_ctx);
   GNUNET_free (rio->url);
   GNUNET_free (rio->post_ctx.json_enc);
   GNUNET_free (rio);
@@ -246,7 +247,7 @@ TALER_MERCHANT_refund_increase (struct GNUNET_CURL_Context 
*ctx,
 /**
  * Cancel a /refund lookup operation
  *
- * @param 
+ * @param
  */
 void
 TALER_MERCHANT_refund_lookup_cancel (struct 
TALER_MERCHANT_RefundLookupOperation *rlo)
@@ -256,7 +257,6 @@ TALER_MERCHANT_refund_lookup_cancel (struct 
TALER_MERCHANT_RefundLookupOperation
     GNUNET_CURL_job_cancel (rlo->job);
     rlo->job = NULL;
   }
-  
   GNUNET_free (rlo->url);
   GNUNET_free (rlo);
 }
@@ -307,7 +307,7 @@ handle_refund_lookup_finished (void *cls,
                   error,
                   code);
       break;
-    } 
+    }
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                 "Failed /refund lookup, backend did not give"
                 " a valid error object, HTTP code was %lu\n",
@@ -344,7 +344,7 @@ TALER_MERCHANT_refund_lookup (struct GNUNET_CURL_Context 
*ctx,
   rlo->ctx = ctx;
   rlo->cb = cb;
   rlo->cb_cls = cb_cls;
-  
+
   base = TALER_url_join (backend_url, "/public/refund", NULL);
   GNUNET_asprintf (&rlo->url,
                    "%s?instance=%s&order_id=%s",
@@ -369,7 +369,7 @@ TALER_MERCHANT_refund_lookup (struct GNUNET_CURL_Context 
*ctx,
   {
     GNUNET_break (0);
     return NULL;
-  
+
   }
 
   return rlo;
diff --git a/src/lib/merchant_api_tip_authorize.c 
b/src/lib/merchant_api_tip_authorize.c
index 9286443..88b499f 100644
--- a/src/lib/merchant_api_tip_authorize.c
+++ b/src/lib/merchant_api_tip_authorize.c
@@ -266,7 +266,7 @@ TALER_MERCHANT_tip_authorize_cancel (struct 
TALER_MERCHANT_TipAuthorizeOperation
     GNUNET_CURL_job_cancel (tao->job);
     tao->job = NULL;
   }
-  GNUNET_free_non_null (tao->post_ctx.json_enc);
+  TALER_curl_easy_post_finished (&tao->post_ctx);
   GNUNET_free (tao->url);
   GNUNET_free (tao);
 }
diff --git a/src/lib/merchant_api_tip_pickup.c 
b/src/lib/merchant_api_tip_pickup.c
index d3d0f66..99863cb 100644
--- a/src/lib/merchant_api_tip_pickup.c
+++ b/src/lib/merchant_api_tip_pickup.c
@@ -118,14 +118,14 @@ check_ok (struct TALER_MERCHANT_TipPickupOperation *tpo,
     {
       json_t *pj = json_array_get (ja, i);
 
-      struct GNUNET_JSON_Specification spec[] = {
+      struct GNUNET_JSON_Specification ispec[] = {
         GNUNET_JSON_spec_fixed_auto ("reserve_sig", &reserve_sigs[i]),
         GNUNET_JSON_spec_end()
       };
 
       if (GNUNET_OK !=
           GNUNET_JSON_parse (pj,
-                             spec,
+                             ispec,
                              NULL, NULL))
       {
         GNUNET_break_op (0);
@@ -329,7 +329,7 @@ TALER_MERCHANT_tip_pickup_cancel (struct 
TALER_MERCHANT_TipPickupOperation *tpo)
     GNUNET_CURL_job_cancel (tpo->job);
     tpo->job = NULL;
   }
-  GNUNET_free_non_null (tpo->post_ctx.json_enc);
+  TALER_curl_easy_post_finished (&tpo->post_ctx);
   GNUNET_free (tpo->url);
   GNUNET_free (tpo);
 }
diff --git a/src/lib/testing_api_cmd_history.c 
b/src/lib/testing_api_cmd_history.c
index 2c60af7..68c1e25 100644
--- a/src/lib/testing_api_cmd_history.c
+++ b/src/lib/testing_api_cmd_history.c
@@ -160,7 +160,6 @@ history_cb (void *cls,
             enum TALER_ErrorCode ec,
             const json_t *json)
 {
-
   struct HistoryState *hs = cls;
   unsigned int nresult;
   struct GNUNET_TIME_Absolute last_timestamp;
@@ -176,7 +175,7 @@ history_cb (void *cls,
   {
     /* 0 was caused intentionally by the tests,
      * move on without further checking. */
-    TALER_TESTING_interpreter_next (hs->is); 
+    TALER_TESTING_interpreter_next (hs->is);
     return;
   }
 
@@ -192,32 +191,34 @@ history_cb (void *cls,
   }
 
   last_timestamp = GNUNET_TIME_absolute_get ();
-  last_timestamp = GNUNET_TIME_absolute_add
-    (last_timestamp, GNUNET_TIME_UNIT_DAYS);
-  json_t *entry;
-  json_t *timestamp;
-  size_t index;
-  json_array_foreach (json, index, entry)
+  last_timestamp = GNUNET_TIME_absolute_add (last_timestamp,
+                                             GNUNET_TIME_UNIT_DAYS);
   {
-    timestamp = json_object_get (entry, "timestamp");
-    if (GNUNET_OK != parse_abs_time (timestamp, &entry_timestamp))
-      TALER_TESTING_FAIL (hs->is);
-
-    if (last_timestamp.abs_value_us < entry_timestamp.abs_value_us)
+    json_t *entry;
+    size_t index;
+    json_array_foreach (json, index, entry)
     {
-      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                  "History entries are NOT"
-                  " sorted from younger to older\n");
-      TALER_TESTING_interpreter_fail (hs->is);
-      return;
+      json_t *timestamp;
+
+      timestamp = json_object_get (entry, "timestamp");
+      if (GNUNET_OK != parse_abs_time (timestamp, &entry_timestamp))
+        TALER_TESTING_FAIL (hs->is);
+
+      if (last_timestamp.abs_value_us < entry_timestamp.abs_value_us)
+      {
+        GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                    "History entries are NOT"
+                    " sorted from younger to older\n");
+        TALER_TESTING_interpreter_fail (hs->is);
+        return;
+      }
+      last_timestamp = entry_timestamp;
     }
-
-    last_timestamp = entry_timestamp;
   }
-
   TALER_TESTING_interpreter_next (hs->is);
 }
 
+
 /**
  * Free the state for a "history" CMD, and possibly cancel
  * any pending operation thereof.
@@ -240,6 +241,7 @@ history_cleanup (void *cls,
   GNUNET_free (hs);
 }
 
+
 /**
  * Run a "history" CMD.
  *
@@ -253,7 +255,7 @@ history_run (void *cls,
              struct TALER_TESTING_Interpreter *is)
 {
   struct HistoryState *hs = cls;
-  
+
   hs->is = is;
   if (0 == hs->time.abs_value_us)
   {
@@ -341,7 +343,7 @@ cmd_history2 (const char *label,
     .run = &history_run,
     .cleanup = &history_cleanup
   };
-  
+
   return cmd;
 }
 
diff --git a/src/lib/testing_api_cmd_pay.c b/src/lib/testing_api_cmd_pay.c
index 15e0ada..68e8b22 100644
--- a/src/lib/testing_api_cmd_pay.c
+++ b/src/lib/testing_api_cmd_pay.c
@@ -138,7 +138,7 @@ struct CheckPaymentState
  */
 struct PayAgainState
 {
-  
+
   /**
    * Expected HTTP response code.
    */
@@ -298,7 +298,7 @@ check_payment_cleanup (void *cls,
                 "Command `%s' was not terminated\n",
                 TALER_TESTING_interpreter_get_current_label (
                   cps->is));
-    TALER_MERCHANT_check_payment_cancel (cps->cpo);  
+    TALER_MERCHANT_check_payment_cancel (cps->cpo);
   }
   GNUNET_free (cps);
 }
@@ -394,7 +394,7 @@ check_payment_run (void *cls,
      check_payment_cb,
      cps);
 
-  GNUNET_assert (NULL != cps->cpo); 
+  GNUNET_assert (NULL != cps->cpo);
 }
 
 /**
@@ -484,8 +484,8 @@ build_coins (struct TALER_MERCHANT_PayCoin **pc,
                       "%u",
                       &ci))
       {
-       GNUNET_break (0);
-       return GNUNET_SYSERR;
+        GNUNET_break (0);
+        return GNUNET_SYSERR;
       }
     }
 
@@ -499,38 +499,39 @@ build_coins (struct TALER_MERCHANT_PayCoin **pc,
     }
 
     GNUNET_array_grow (*pc,
-                      *npc,
-                      (*npc) + 1);
-
-    icoin = &(*pc)[(*npc)-1];
-
-    const struct TALER_CoinSpendPrivateKeyP *coin_priv; 
-    const struct TALER_DenominationSignature *denom_sig;
-    const struct TALER_Amount *denom_value;
-    const struct TALER_EXCHANGE_DenomPublicKey *denom_pub;
+                       *npc,
+                       (*npc) + 1);
 
-    GNUNET_assert
-      (GNUNET_OK == TALER_TESTING_get_trait_coin_priv
-        (coin_cmd, 0, &coin_priv));
-
-    GNUNET_assert
-      (GNUNET_OK == TALER_TESTING_get_trait_denom_pub
-        (coin_cmd, 0, &denom_pub));
+    icoin = &((*pc)[(*npc)-1]);
 
-    GNUNET_assert
-      (GNUNET_OK == TALER_TESTING_get_trait_denom_sig
-        (coin_cmd, 0, &denom_sig));
-
-    GNUNET_assert
-      (GNUNET_OK == TALER_TESTING_get_trait_amount_obj
-        (coin_cmd, 0, &denom_value));
-
-    icoin->coin_priv = *coin_priv;
-    icoin->denom_pub = denom_pub->key;
-    icoin->denom_sig = *denom_sig;
-    icoin->denom_value = *denom_value;
-    icoin->amount_with_fee = *denom_value;
-    
+    {
+      const struct TALER_CoinSpendPrivateKeyP *coin_priv;
+      const struct TALER_DenominationSignature *denom_sig;
+      const struct TALER_Amount *denom_value;
+      const struct TALER_EXCHANGE_DenomPublicKey *denom_pub;
+
+      GNUNET_assert
+        (GNUNET_OK == TALER_TESTING_get_trait_coin_priv
+         (coin_cmd, 0, &coin_priv));
+
+      GNUNET_assert
+        (GNUNET_OK == TALER_TESTING_get_trait_denom_pub
+         (coin_cmd, 0, &denom_pub));
+
+      GNUNET_assert
+        (GNUNET_OK == TALER_TESTING_get_trait_denom_sig
+         (coin_cmd, 0, &denom_sig));
+
+      GNUNET_assert
+        (GNUNET_OK == TALER_TESTING_get_trait_amount_obj
+         (coin_cmd, 0, &denom_value));
+
+      icoin->coin_priv = *coin_priv;
+      icoin->denom_pub = denom_pub->key;
+      icoin->denom_sig = *denom_sig;
+      icoin->denom_value = *denom_value;
+      icoin->amount_with_fee = *denom_value;
+    }
     GNUNET_assert (NULL != (dpk = TALER_TESTING_find_pk
       (is->keys, &icoin->denom_value)));
 
@@ -541,11 +542,12 @@ build_coins (struct TALER_MERCHANT_PayCoin **pc,
 
     GNUNET_assert
       (GNUNET_OK == TALER_TESTING_get_trait_url
-        (coin_cmd, 0, &icoin->exchange_url)); 
+        (coin_cmd, 0, &icoin->exchange_url));
 
     GNUNET_assert
       (GNUNET_OK == TALER_string_to_amount
         (refund_fee, &icoin->refund_fee));
+
   }
 
   return GNUNET_OK;
@@ -577,7 +579,6 @@ pay_cb (void *cls,
   const char *error_name;
   unsigned int error_line;
   const struct GNUNET_CRYPTO_EddsaPublicKey *merchant_pub;
-  const struct TALER_TESTING_Command *proposal_cmd;
 
   ps->po = NULL;
   if (ps->http_status != http_status)
@@ -601,6 +602,7 @@ pay_cb (void *cls,
                                   &ps->h_contract_terms),
       GNUNET_JSON_spec_end ()
     };
+    const struct TALER_TESTING_Command *proposal_cmd;
 
     GNUNET_assert (GNUNET_OK == GNUNET_JSON_parse (
       obj, spec,
@@ -687,9 +689,9 @@ pay_abort_cb (void *cls,
     pas->res = GNUNET_new_array
       (num_refunds, struct TALER_MERCHANT_RefundEntry);
 
-    memcpy (pas->res, res,
-           num_refunds * sizeof
-              (struct TALER_MERCHANT_RefundEntry));
+    memcpy (pas->res,
+            res,
+            num_refunds * sizeof (struct TALER_MERCHANT_RefundEntry));
     pas->h_contract = *h_contract;
     pas->merchant_pub = *merchant_pub;
   }
@@ -890,7 +892,7 @@ pay_run (void *cls,
 {
 
   struct PayState *ps = cls;
-  
+
   ps->is = is;
   if (NULL == (ps->po = _pay_run (ps->merchant_url,
                                   ps->coin_reference,
@@ -1071,7 +1073,7 @@ pay_abort_cleanup (void *cls,
                   pas->is));
     TALER_MERCHANT_pay_cancel (pas->pao);
   }
-
+  GNUNET_free_non_null (pas->res);
   GNUNET_free (pas);
 }
 
@@ -1087,7 +1089,7 @@ pay_abort_run (void *cls,
                const struct TALER_TESTING_Command *cmd,
                struct TALER_TESTING_Interpreter *is)
 {
-  
+
   struct PayAbortState *pas = cls;
   const struct TALER_TESTING_Command *pay_cmd;
 
@@ -1096,13 +1098,13 @@ pay_abort_run (void *cls,
   const char *amount_with_fee;
   const char *amount_without_fee;
   const char *refund_fee;
-  
+
   pas->is = is;
   pay_cmd = TALER_TESTING_interpreter_lookup_command
     (is, pas->pay_reference);
   if (NULL == pay_cmd)
     TALER_TESTING_FAIL (is);
-  
+
   if (GNUNET_OK != TALER_TESTING_get_trait_proposal_reference
       (pay_cmd, 0, &proposal_reference))
     TALER_TESTING_FAIL (is);
@@ -1202,7 +1204,7 @@ TALER_TESTING_cmd_pay_abort (const char *label,
     .cleanup = &pay_abort_cleanup,
     .traits = &pay_abort_traits
   };
-  
+
   return cmd;
 }
 
@@ -1307,13 +1309,13 @@ pay_again_run (void *cls,
   const char *proposal_reference;
   const char *amount_with_fee;
   const char *amount_without_fee;
-  
+
   pas->is = is;
   pay_cmd = TALER_TESTING_interpreter_lookup_command
     (is, pas->pay_reference);
   if (NULL == pay_cmd)
     TALER_TESTING_FAIL (is);
-  
+
   if (GNUNET_OK != TALER_TESTING_get_trait_proposal_reference
       (pay_cmd, 0, &proposal_reference))
     TALER_TESTING_FAIL (is);
@@ -1401,7 +1403,7 @@ TALER_TESTING_cmd_pay_again (const char *label,
     .run = &pay_again_run,
     .cleanup = &pay_again_cleanup
   };
-  
+
   return cmd;
 }
 
@@ -1515,9 +1517,9 @@ pay_abort_refund_run (void *cls,
       (abort_cmd, 0, &refund_entry))
     TALER_TESTING_FAIL (is);
 
-  GNUNET_assert (GNUNET_OK == TALER_string_to_amount 
+  GNUNET_assert (GNUNET_OK == TALER_string_to_amount
     (pars->refund_amount, &refund_amount));
-  GNUNET_assert (GNUNET_OK == TALER_string_to_amount 
+  GNUNET_assert (GNUNET_OK == TALER_string_to_amount
     (pars->refund_fee, &refund_fee));
 
   pars->rh = TALER_EXCHANGE_refund2
diff --git a/src/lib/testing_api_cmd_proposal.c 
b/src/lib/testing_api_cmd_proposal.c
index bceecc1..71a0206 100644
--- a/src/lib/testing_api_cmd_proposal.c
+++ b/src/lib/testing_api_cmd_proposal.c
@@ -176,12 +176,11 @@ proposal_traits (void *cls,
     MAKE_TRAIT_NONCE (&ps->nonce),
     TALER_TESTING_trait_end ()
   };
-  
+
   return TALER_TESTING_get_trait (traits,
                                   ret,
                                   trait,
                                   index);
-  return GNUNET_SYSERR;
 }
 
 
@@ -350,7 +349,7 @@ proposal_run (void *cls,
     // human error here.
     GNUNET_break (0);
     fprintf (stderr, "%s\n", error.text);
-    TALER_TESTING_interpreter_fail (is); 
+    TALER_TESTING_interpreter_fail (is);
     return;
   }
 
@@ -360,7 +359,7 @@ proposal_run (void *cls,
     struct GNUNET_TIME_Absolute now;
     char *order_id;
 
-    now = GNUNET_TIME_absolute_get (); 
+    now = GNUNET_TIME_absolute_get ();
 
     order_id = GNUNET_STRINGS_data_to_string_alloc
       (&now.abs_value_us,
@@ -541,7 +540,6 @@ proposal_lookup_run (void *cls,
                      struct TALER_TESTING_Interpreter *is)
 {
   struct ProposalLookupState *pls = cls;
-  const struct TALER_TESTING_Command *proposal_cmd;
   const char *order_id;
   const struct GNUNET_CRYPTO_EddsaPublicKey *nonce;
   /* Only used if we do NOT use the nonce from traits.  */
@@ -561,6 +559,8 @@ proposal_lookup_run (void *cls,
   }
   else
   {
+    const struct TALER_TESTING_Command *proposal_cmd;
+
     proposal_cmd = TALER_TESTING_interpreter_lookup_command
       (is, pls->proposal_reference);
 
@@ -569,7 +569,7 @@ proposal_lookup_run (void *cls,
 
     if (GNUNET_OK != GET_TRAIT_NONCE (proposal_cmd,
                                       &nonce))
-      TALER_TESTING_FAIL (is); 
+      TALER_TESTING_FAIL (is);
 
     if (GNUNET_OK != TALER_TESTING_get_trait_order_id
         (proposal_cmd, 0, &order_id))
@@ -607,7 +607,7 @@ TALER_TESTING_cmd_proposal_lookup
    const char *order_id)
 {
   struct ProposalLookupState *pls;
-  
+
   pls = GNUNET_new (struct ProposalLookupState);
   pls->http_status = http_status;
   pls->proposal_reference = proposal_reference;
diff --git a/src/lib/testing_api_cmd_refund.c b/src/lib/testing_api_cmd_refund.c
index c8b825a..abe68f8 100644
--- a/src/lib/testing_api_cmd_refund.c
+++ b/src/lib/testing_api_cmd_refund.c
@@ -275,7 +275,6 @@ refund_lookup_cb (void *cls,
   char *coin_reference_dup;
   const char *icoin_reference;
   const struct TALER_TESTING_Command *pay_cmd;
-  const struct TALER_TESTING_Command *icoin_cmd;
   const struct TALER_TESTING_Command *increase_cmd;
   const char *refund_amount;
   struct TALER_Amount acc;
@@ -286,7 +285,6 @@ refund_lookup_cb (void *cls,
   if (rls->http_code != http_status)
     TALER_TESTING_FAIL (rls->is);
 
-  map = GNUNET_CONTAINER_multihashmap_create (1, GNUNET_NO);
   arr = json_object_get (obj, "refund_permissions");
   if (NULL == arr)
   {
@@ -295,6 +293,7 @@ refund_lookup_cb (void *cls,
     TALER_TESTING_interpreter_next (rls->is);
     return;
   }
+  map = GNUNET_CONTAINER_multihashmap_create (1, GNUNET_NO);
 
   /* Put in array every refunded coin.  */
   json_array_foreach (arr, index, elem)
@@ -344,6 +343,7 @@ refund_lookup_cb (void *cls,
     struct TALER_CoinSpendPublicKeyP icoin_pub;
     struct GNUNET_HashCode h_icoin_pub;
     struct TALER_Amount *iamount;
+    const struct TALER_TESTING_Command *icoin_cmd;
 
     if ( NULL ==
        ( icoin_cmd = TALER_TESTING_interpreter_lookup_command
@@ -351,8 +351,9 @@ refund_lookup_cb (void *cls,
     {
       GNUNET_break (0);
       TALER_LOG_ERROR ("Bad reference `%s'\n",
-                       icoin_reference); 
+                       icoin_reference);
       TALER_TESTING_interpreter_fail (rls->is);
+      GNUNET_CONTAINER_multihashmap_destroy (map);
       return;
     }
 
@@ -362,11 +363,12 @@ refund_lookup_cb (void *cls,
      GNUNET_break (0);
      TALER_LOG_ERROR ("Command `%s' failed to give coin"
                       " priv trait\n",
-                      icoin_reference); 
+                      icoin_reference);
      TALER_TESTING_interpreter_fail (rls->is);
+     GNUNET_CONTAINER_multihashmap_destroy (map);
      return;
     }
-     
+
     GNUNET_CRYPTO_eddsa_key_get_public (&icoin_priv->eddsa_priv,
                                         &icoin_pub.eddsa_pub);
     GNUNET_CRYPTO_hash (&icoin_pub,
@@ -386,7 +388,7 @@ refund_lookup_cb (void *cls,
   }
 
   GNUNET_free (coin_reference_dup);
-  
+
   if (NULL !=
     (increase_cmd = TALER_TESTING_interpreter_lookup_command
       (rls->is, rls->increase_reference)))
@@ -443,7 +445,7 @@ refund_lookup_run (void *cls,
                    struct TALER_TESTING_Interpreter *is)
 {
   struct RefundLookupState *rls = cls;
-  
+
   rls->is = is;
   rls->rlo = TALER_MERCHANT_refund_lookup (is->ctx,
                                            rls->merchant_url,
@@ -472,7 +474,7 @@ refund_increase_traits (void *cls,
                         unsigned int index)
 {
   struct RefundIncreaseState *ris = cls;
-  
+
   struct TALER_TESTING_Trait traits[] = {
     TALER_TESTING_make_trait_amount (0, ris->refund_amount),
     TALER_TESTING_trait_end ()
diff --git a/src/lib/testing_api_cmd_tip.c b/src/lib/testing_api_cmd_tip.c
index 4404367..6e1f529 100644
--- a/src/lib/testing_api_cmd_tip.c
+++ b/src/lib/testing_api_cmd_tip.c
@@ -88,7 +88,7 @@ struct TipPickupState
    * How many coins are involved in the tipping operation.
    */
   unsigned int num_coins;
-  
+
   /**
    * The array of denomination keys, in the same order of @a
    * amounts.
@@ -176,7 +176,7 @@ struct TipQueryState
  */
 struct TipAuthorizeState
 {
-  
+
   /**
    * Merchant base URL.
    */
@@ -255,7 +255,7 @@ tip_authorize_cb (void *cls,
                   struct GNUNET_TIME_Absolute tip_expiration,
                   const char *exchange_url)
 {
-  struct TipAuthorizeState *tas = cls; 
+  struct TipAuthorizeState *tas = cls;
 
   tas->tao = NULL;
   if (tas->http_status != http_status)
@@ -321,7 +321,6 @@ tip_authorize_traits (void *cls,
                       unsigned int index)
 {
   struct TipAuthorizeState *tas = cls;
-
   struct TALER_TESTING_Trait traits[] = {
     TALER_TESTING_make_trait_tip_id (0, &tas->tip_id),
     TALER_TESTING_trait_end (),
@@ -331,9 +330,9 @@ tip_authorize_traits (void *cls,
                                   ret,
                                   trait,
                                   index);
-  return GNUNET_SYSERR;
 }
 
+
 /**
  * Runs the /tip-authorize CMD
  *
@@ -347,7 +346,7 @@ tip_authorize_run (void *cls,
                    struct TALER_TESTING_Interpreter *is)
 {
   struct TipAuthorizeState *tas = cls;
-  struct TALER_Amount amount; 
+  struct TALER_Amount amount;
 
   tas->is = is;
   if (GNUNET_OK != TALER_string_to_amount (tas->amount,
@@ -461,7 +460,7 @@ TALER_TESTING_cmd_tip_authorize_with_ec
     .cleanup = &tip_authorize_cleanup,
     .traits = &tip_authorize_traits
   };
-  
+
   return cmd;
 }
 
@@ -508,7 +507,7 @@ TALER_TESTING_cmd_tip_authorize (const char *label,
     .cleanup = &tip_authorize_cleanup,
     .traits = &tip_authorize_traits
   };
-  
+
   return cmd;
 }
 
@@ -557,9 +556,15 @@ tip_query_cb (void *cls,
   {
     GNUNET_assert (GNUNET_OK == TALER_string_to_amount
       (tqs->expected_amount_available, &a));
-    TALER_LOG_INFO ("expected available %s, actual %s\n",
-                    TALER_amount_to_string (&a),
-                    TALER_amount_to_string (amount_available));
+    {
+      char *str;
+
+      str = TALER_amount_to_string (amount_available);
+      TALER_LOG_INFO ("expected available %s, actual %s\n",
+                      TALER_amount2s (&a),
+                      str);
+      GNUNET_free (str);
+    }
     if (0 != TALER_amount_cmp (amount_available, &a))
       TALER_TESTING_FAIL (tqs->is);
   }
@@ -568,9 +573,15 @@ tip_query_cb (void *cls,
   {
     GNUNET_assert (GNUNET_OK == TALER_string_to_amount
       (tqs->expected_amount_authorized, &a));
-    TALER_LOG_INFO ("expected authorized %s, actual %s\n",
-                    TALER_amount_to_string (&a),
-                    TALER_amount_to_string (amount_authorized));
+    {
+      char *str;
+
+      str = TALER_amount_to_string (amount_authorized);
+      TALER_LOG_INFO ("expected authorized %s, actual %s\n",
+                      TALER_amount2s (&a),
+                      str);
+      GNUNET_free (str);
+    }
     if (0 != TALER_amount_cmp (amount_authorized, &a))
       TALER_TESTING_FAIL (tqs->is);
   }
@@ -579,9 +590,14 @@ tip_query_cb (void *cls,
   {
     GNUNET_assert (GNUNET_OK == TALER_string_to_amount
       (tqs->expected_amount_picked_up, &a));
-    TALER_LOG_INFO ("expected picked_up %s, actual %s\n",
-                    TALER_amount_to_string (&a),
-                    TALER_amount_to_string (amount_picked_up));
+    {
+      char *str;
+      str = TALER_amount_to_string (amount_picked_up);
+      TALER_LOG_INFO ("expected picked_up %s, actual %s\n",
+                      TALER_amount2s (&a),
+                      str);
+      GNUNET_free (str);
+    }
     if (0 != TALER_amount_cmp (amount_picked_up, &a))
       TALER_TESTING_FAIL (tqs->is);
   }
@@ -627,7 +643,7 @@ tip_query_run (void *cls,
                struct TALER_TESTING_Interpreter *is)
 {
   struct TipQueryState *tqs = cls;
-  
+
   tqs->is = is;
   tqs->tqo = TALER_MERCHANT_tip_query (is->ctx,
                                        tqs->merchant_url,
@@ -681,7 +697,7 @@ TALER_TESTING_cmd_tip_query_with_amounts
     .run = &tip_query_run,
     .cleanup = &tip_query_cleanup
   };
-  
+
   return cmd;
 }
 
@@ -715,7 +731,7 @@ TALER_TESTING_cmd_tip_query (const char *label,
     .run = &tip_query_run,
     .cleanup = &tip_query_cleanup
   };
-  
+
   return cmd;
 }
 
@@ -740,7 +756,7 @@ struct WithdrawHandle
    */
   unsigned int off;
 
-  
+
   /**
    * Internal state of the "pickup" CMD.
    */
@@ -748,7 +764,7 @@ struct WithdrawHandle
 };
 
 /**
- * This callback handles the response of a withdraw operation 
+ * This callback handles the response of a withdraw operation
  * from the exchange, that is the final step in getting the tip.
  *
  * @param cls closure, a `struct WithdrawHandle *`
@@ -911,7 +927,6 @@ tip_pickup_run (void *cls,
                 const struct TALER_TESTING_Command *cmd,
                 struct TALER_TESTING_Interpreter *is)
 {
-
   struct TipPickupState *tps = cls;
   unsigned int num_planchets;
   const struct TALER_TESTING_Command *replay_cmd;
@@ -935,8 +950,8 @@ tip_pickup_run (void *cls,
     if ( NULL == /* looking for "parent" tip-pickup command */
        ( replay_cmd = TALER_TESTING_interpreter_lookup_command
          (is, tps->replay_reference)) )
-    TALER_TESTING_FAIL (is);   
-    
+    TALER_TESTING_FAIL (is);
+
     if (GNUNET_OK != TALER_TESTING_get_trait_uint
         (replay_cmd, 0, &np))
       TALER_TESTING_FAIL (is);
@@ -975,7 +990,7 @@ tip_pickup_run (void *cls,
         if (NULL == tps->dks[i])
           TALER_TESTING_FAIL (is);
 
-        TALER_planchet_setup_random (&tps->psa[i]); 
+        TALER_planchet_setup_random (&tps->psa[i]);
       }
       else
       {
@@ -994,9 +1009,9 @@ tip_pickup_run (void *cls,
       if (GNUNET_OK != TALER_planchet_prepare (&tps->dks[i]->key,
                                                &tps->psa[i],
                                                &planchets[i]))
-        TALER_TESTING_FAIL (is); 
+        TALER_TESTING_FAIL (is);
     }
-    
+
     if (GNUNET_OK != TALER_TESTING_get_trait_tip_id
       (authorize_cmd, 0, &tip_id))
       TALER_TESTING_FAIL (is);
@@ -1008,6 +1023,12 @@ tip_pickup_run (void *cls,
                                           planchets,
                                           &pickup_cb,
                                           tps);
+    for (unsigned int i=0;i<num_planchets;i++)
+    {
+      GNUNET_free (planchets[i].coin_ev);
+      planchets[i].coin_ev = NULL;
+      planchets[i].coin_ev_size = 0;
+    }
     GNUNET_assert (NULL != tps->tpo);
   }
 }
@@ -1029,7 +1050,13 @@ tip_pickup_cleanup (void *cls,
   GNUNET_free_non_null (tps->dks);
   GNUNET_free_non_null (tps->psa);
   GNUNET_free_non_null (tps->withdraws);
-  GNUNET_free_non_null (tps->sigs);
+  if (NULL != tps->sigs)
+  {
+    for (unsigned int i=0;i<tps->num_coins;i++)
+      if (NULL != tps->sigs[i].rsa_signature)
+        GNUNET_CRYPTO_rsa_signature_free (tps->sigs[i].rsa_signature);
+    GNUNET_free (tps->sigs);
+  }
 
   if (NULL != tps->tpo)
   {
@@ -1061,7 +1088,7 @@ tip_pickup_traits (void *cls,
   struct TipPickupState *tps = cls;
   #define NUM_TRAITS (tps->num_coins * 5) + 2
   struct TALER_TESTING_Trait traits[NUM_TRAITS];
-  
+
   for (unsigned int i=0; i<tps->num_coins; i++)
   {
     traits[i] = TALER_TESTING_make_trait_planchet_secrets
@@ -1090,9 +1117,9 @@ tip_pickup_traits (void *cls,
                                   ret,
                                   trait,
                                   index);
-  return GNUNET_SYSERR;
 }
 
+
 /**
  * Define a /tip-pickup CMD, equipped with the expected error
  * code.
@@ -1134,7 +1161,7 @@ TALER_TESTING_cmd_tip_pickup_with_ec
     .cleanup = &tip_pickup_cleanup,
     .traits = &tip_pickup_traits
   };
-  
+
   return cmd;
 }
 
@@ -1173,7 +1200,7 @@ TALER_TESTING_cmd_tip_pickup
     .cleanup = &tip_pickup_cleanup,
     .traits = &tip_pickup_traits
   };
-  
+
   return cmd;
 }
 
@@ -1201,7 +1228,7 @@ TALER_TESTING_cmd_tip_authorize_fake (const char *label)
     .cleanup = &tip_authorize_cleanup,
     .traits = &tip_authorize_traits
   };
-  
+
   return cmd;
 }
 
diff --git a/src/lib/testing_api_cmd_track.c b/src/lib/testing_api_cmd_track.c
index c6169c6..9cd4803 100644
--- a/src/lib/testing_api_cmd_track.c
+++ b/src/lib/testing_api_cmd_track.c
@@ -137,8 +137,6 @@ track_transaction_cb (void *cls,
                       const json_t *json)
 {
   struct TrackTransactionState *tts = cls;
-  json_t *wtid_str;
-  json_t *exchange_url;
 
   tts->tth = NULL;
   if (tts->http_status != http_status)
@@ -160,6 +158,8 @@ track_transaction_cb (void *cls,
     /* Only storing first element's wtid, as this works around
      * the disability of the real bank to provide a "bank check"
      * CMD as the fakebank does.  */
+    json_t *wtid_str;
+    json_t *exchange_url;
 
     if (NULL == (wtid_str = json_object_get
       (json_array_get (json, 0), "wtid")))

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



reply via email to

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