gnunet-svn
[Top][All Lists]
Advanced

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

[taler-merchant] branch master updated: fix hash_from_string confusion a


From: gnunet
Subject: [taler-merchant] branch master updated: fix hash_from_string confusion and other unchecked return value issues
Date: Sat, 29 Aug 2020 12:04:01 +0200

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

grothoff pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new e51c403  fix hash_from_string confusion and other unchecked return 
value issues
e51c403 is described below

commit e51c40338077a3bd93ca5b0be6d3ae15aec1af61
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sat Aug 29 12:03:59 2020 +0200

    fix hash_from_string confusion and other unchecked return value issues
---
 src/backend/taler-merchant-httpd_post-tips-ID-pickup.c    |  5 +++--
 src/backend/taler-merchant-httpd_private-post-transfers.c |  5 +++--
 src/merchant-tools/taler-merchant-setup-reserve.c         | 14 ++++++++++----
 3 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_post-tips-ID-pickup.c 
b/src/backend/taler-merchant-httpd_post-tips-ID-pickup.c
index 729a07f..5171347 100644
--- a/src/backend/taler-merchant-httpd_post-tips-ID-pickup.c
+++ b/src/backend/taler-merchant-httpd_post-tips-ID-pickup.c
@@ -472,8 +472,9 @@ compute_total_requested (void *cls,
     TMH_trigger_daemon ();   /* we resumed, kick MHD */
     return;
   }
-  TALER_amount_get_zero (TMH_currency,
-                         &pc->total_requested);
+  GNUNET_assert (GNUNET_OK ==
+                 TALER_amount_get_zero (TMH_currency,
+                                        &pc->total_requested));
   for (unsigned int i = 0; i<pc->planchets_length; i++)
   {
     struct TALER_PlanchetDetail *pd = &pc->planchets[i];
diff --git a/src/backend/taler-merchant-httpd_private-post-transfers.c 
b/src/backend/taler-merchant-httpd_private-post-transfers.c
index 34c32d1..0433059 100644
--- a/src/backend/taler-merchant-httpd_private-post-transfers.c
+++ b/src/backend/taler-merchant-httpd_private-post-transfers.c
@@ -711,8 +711,9 @@ transfer_summary_cb (void *cls,
   struct Entry *current_entry;
   struct GNUNET_HashCode h_key;
 
-  GNUNET_CRYPTO_hash_from_string (order_id,
-                                  &h_key);
+  GNUNET_CRYPTO_hash (order_id,
+                      strlen (order_id),
+                      &h_key);
   current_entry = GNUNET_CONTAINER_multihashmap_get (map,
                                                      &h_key);
   if (NULL != current_entry)
diff --git a/src/merchant-tools/taler-merchant-setup-reserve.c 
b/src/merchant-tools/taler-merchant-setup-reserve.c
index f75b8cc..36c6d01 100644
--- a/src/merchant-tools/taler-merchant-setup-reserve.c
+++ b/src/merchant-tools/taler-merchant-setup-reserve.c
@@ -202,8 +202,14 @@ run (void *cls,
                      "%s: %s",
                      MHD_HTTP_HEADER_AUTHORIZATION,
                      apikey);
-    GNUNET_CURL_append_header (ctx,
-                               auth_header);
+    if (GNUNET_OK !=
+        GNUNET_CURL_append_header (ctx,
+                                   auth_header))
+    {
+      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                  "Failed so sett %s header, trying without\n",
+                  MHD_HTTP_HEADER_AUTHORIZATION);
+    }
     GNUNET_free (auth_header);
   }
 
@@ -220,8 +226,8 @@ run (void *cls,
                                       NULL);
   if (NULL == prh)
   {
-    fprintf (stderr,
-             "Failed to begin operation!\n");
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Failed to begin operation with merchant backend!\n");
     global_ret = 2;
     GNUNET_SCHEDULER_shutdown ();
     return;

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