summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_private-post-instances.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-11-01 23:38:53 +0100
committerChristian Grothoff <christian@grothoff.org>2021-11-01 23:38:53 +0100
commitc9c8caea1a716d7246853e69b0148ffa3bee696d (patch)
treedada332f4e98df9eafe48b6ee7de4431d034c1ac /src/backend/taler-merchant-httpd_private-post-instances.c
parente1d16d11269a1fae896e200afd70e38d0040928d (diff)
downloadmerchant-c9c8caea1a716d7246853e69b0148ffa3bee696d.tar.gz
merchant-c9c8caea1a716d7246853e69b0148ffa3bee696d.tar.bz2
merchant-c9c8caea1a716d7246853e69b0148ffa3bee696d.zip
fix fTBFS
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-post-instances.c')
-rw-r--r--src/backend/taler-merchant-httpd_private-post-instances.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/src/backend/taler-merchant-httpd_private-post-instances.c b/src/backend/taler-merchant-httpd_private-post-instances.c
index 7951652a..71be2673 100644
--- a/src/backend/taler-merchant-httpd_private-post-instances.c
+++ b/src/backend/taler-merchant-httpd_private-post-instances.c
@@ -60,8 +60,7 @@ accounts_equal (const struct TMH_MerchantInstance *mi,
NULL != wm;
wm = wm->next)
{
- const char *uri = json_string_value (json_object_get (wm->j_wire,
- "payto_uri"));
+ const char *uri = wm->payto_uri;
GNUNET_assert (NULL != uri);
for (unsigned int i = 0; i<len; i++)
@@ -99,7 +98,7 @@ accounts_equal (const struct TMH_MerchantInstance *mi,
static void
free_wm (struct TMH_WireMethod *wm)
{
- json_decref (wm->j_wire);
+ GNUNET_free (wm->payto_uri);
GNUNET_free (wm->wire_method);
GNUNET_free (wm);
}
@@ -411,21 +410,13 @@ TMH_private_post_instances (const struct TMH_RequestHandler *rh,
NULL != wm;
wm = wm->next)
{
- struct TALER_MERCHANTDB_AccountDetails ad;
- struct GNUNET_JSON_Specification spec[] = {
- GNUNET_JSON_spec_string ("payto_uri",
- &ad.payto_uri),
- GNUNET_JSON_spec_fixed_auto ("salt",
- &ad.salt),
- GNUNET_JSON_spec_end ()
+ struct TALER_MERCHANTDB_AccountDetails ad = {
+ .payto_uri = wm->payto_uri,
+ .salt = wm->wire_salt,
+ .h_wire = wm->h_wire,
+ .active = wm->active
};
- GNUNET_assert (GNUNET_OK ==
- TALER_MHD_parse_json_data (NULL,
- wm->j_wire,
- spec));
- ad.h_wire = wm->h_wire;
- ad.active = wm->active;
qs = TMH_db->insert_account (TMH_db->cls,
mi->settings.id,
&ad);