diff options
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-post-instances.c')
-rw-r--r-- | src/backend/taler-merchant-httpd_private-post-instances.c | 23 |
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); |