gnunet-svn
[Top][All Lists]
Advanced

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

[taler-merchant] branch master updated: fix GET instance test failures


From: gnunet
Subject: [taler-merchant] branch master updated: fix GET instance test failures
Date: Mon, 24 Apr 2023 20:03:19 +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 ffcf4488 fix GET instance test failures
ffcf4488 is described below

commit ffcf44889d13d9a327cd47a2b1d44691cca21b9e
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Apr 24 20:03:15 2023 +0200

    fix GET instance test failures
---
 contrib/wallet-core                                         |  2 +-
 doc/prebuilt                                                |  2 +-
 src/backend/taler-merchant-httpd_private-get-instances-ID.c |  7 ++++---
 src/include/taler_merchant_service.h                        |  5 +++++
 src/lib/merchant_api_get_instance.c                         | 12 ++++++++----
 5 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/contrib/wallet-core b/contrib/wallet-core
index abc01ba2..7079bce1 160000
--- a/contrib/wallet-core
+++ b/contrib/wallet-core
@@ -1 +1 @@
-Subproject commit abc01ba21f670960df8a79047d536f16c263183b
+Subproject commit 7079bce1ad2640e44561f56b46d5f00758df8e5d
diff --git a/doc/prebuilt b/doc/prebuilt
index 4739f144..8452f991 160000
--- a/doc/prebuilt
+++ b/doc/prebuilt
@@ -1 +1 @@
-Subproject commit 4739f1447d0e8a6534c7fbdbc361d5d756d1875b
+Subproject commit 8452f991dd967328207fab52a99beb19e2cb4dff
diff --git a/src/backend/taler-merchant-httpd_private-get-instances-ID.c 
b/src/backend/taler-merchant-httpd_private-get-instances-ID.c
index d2e3d937..2a2116d9 100644
--- a/src/backend/taler-merchant-httpd_private-get-instances-ID.c
+++ b/src/backend/taler-merchant-httpd_private-get-instances-ID.c
@@ -52,9 +52,10 @@ get_instances_ID (struct TMH_MerchantInstance *mi,
           GNUNET_JSON_pack_string (
             "payto_uri",
             wm->payto_uri),
-          GNUNET_JSON_pack_string (
-            "credit_facade_url",
-            wm->credit_facade_url),
+          GNUNET_JSON_pack_allow_null (
+            GNUNET_JSON_pack_string (
+              "credit_facade_url",
+              wm->credit_facade_url)),
           GNUNET_JSON_pack_data_auto ("h_wire",
                                       &wm->h_wire),
           GNUNET_JSON_pack_data_auto (
diff --git a/src/include/taler_merchant_service.h 
b/src/include/taler_merchant_service.h
index 39f39a3e..8cf8fbcc 100644
--- a/src/include/taler_merchant_service.h
+++ b/src/include/taler_merchant_service.h
@@ -718,6 +718,11 @@ struct TALER_MERCHANT_Account
    */
   const char *payto_uri;
 
+  /**
+   * Credit facade URL of the account.
+   */
+  const char *credit_facade_url;
+
   /**
    * Hash of @e payto_uri and @e salt.
    */
diff --git a/src/lib/merchant_api_get_instance.c 
b/src/lib/merchant_api_get_instance.c
index c8fbfc00..6807866f 100644
--- a/src/lib/merchant_api_get_instance.c
+++ b/src/lib/merchant_api_get_instance.c
@@ -137,19 +137,24 @@ handle_get_instance_finished (void *cls,
       {
         unsigned int accounts_length = json_array_size (accounts);
         struct TALER_MERCHANT_Account aa[accounts_length];
-        const char *payto_uris[accounts_length];
         size_t index;
         json_t *value;
         int ret = GNUNET_OK;
 
-        memset (payto_uris, 0, sizeof (payto_uris));
+        memset (aa,
+                0,
+                sizeof (aa));
         json_array_foreach (accounts, index, value)
         {
           struct GNUNET_JSON_Specification spec[] = {
             GNUNET_JSON_spec_fixed_auto ("salt",
                                          &aa[index].salt),
+            GNUNET_JSON_spec_mark_optional (
+              GNUNET_JSON_spec_string ("credit_facade_url",
+                                       &aa[index].credit_facade_url),
+              NULL),
             GNUNET_JSON_spec_string ("payto_uri",
-                                     &payto_uris[index]),
+                                     &aa[index].payto_uri),
             GNUNET_JSON_spec_fixed_auto ("h_wire",
                                          &aa[index].h_wire),
             GNUNET_JSON_spec_bool ("active",
@@ -168,7 +173,6 @@ handle_get_instance_finished (void *cls,
             igr.hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
             break;
           }
-          aa[index].payto_uri = payto_uris[index];
         }
 
         if (GNUNET_OK == ret)

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