summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_private-post-orders.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-post-orders.c')
-rw-r--r--src/backend/taler-merchant-httpd_private-post-orders.c81
1 files changed, 43 insertions, 38 deletions
diff --git a/src/backend/taler-merchant-httpd_private-post-orders.c b/src/backend/taler-merchant-httpd_private-post-orders.c
index 10a8d503..5444222b 100644
--- a/src/backend/taler-merchant-httpd_private-post-orders.c
+++ b/src/backend/taler-merchant-httpd_private-post-orders.c
@@ -1060,51 +1060,56 @@ patch_order (struct MHD_Connection *connection,
TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_PROPOSAL_PARSE_ERROR,
"'merchant' field already set, but must be provided by backend");
}
- jmerchant = GNUNET_JSON_PACK (
- GNUNET_JSON_pack_string ("name",
- settings->name),
- GNUNET_JSON_pack_allow_null (
- GNUNET_JSON_pack_string ("website",
- settings->website)),
- GNUNET_JSON_pack_allow_null (
- GNUNET_JSON_pack_string ("email",
- settings->email)),
- GNUNET_JSON_pack_allow_null (
- GNUNET_JSON_pack_string ("logo",
- settings->logo)));
- GNUNET_assert (NULL != jmerchant);
+
{
- json_t *loca;
+ json_t *jm;
- /* Handle merchant address */
- loca = settings->address;
- if (NULL != loca)
+ jm = GNUNET_JSON_PACK (
+ GNUNET_JSON_pack_string ("name",
+ settings->name),
+ GNUNET_JSON_pack_allow_null (
+ GNUNET_JSON_pack_string ("website",
+ settings->website)),
+ GNUNET_JSON_pack_allow_null (
+ GNUNET_JSON_pack_string ("email",
+ settings->email)),
+ GNUNET_JSON_pack_allow_null (
+ GNUNET_JSON_pack_string ("logo",
+ settings->logo)));
+ GNUNET_assert (NULL != jm);
{
- loca = json_deep_copy (loca);
- GNUNET_assert (0 ==
- json_object_set_new (jmerchant,
- "address",
- loca));
- }
- }
- {
- json_t *locj;
+ json_t *loca;
- /* Handle merchant jurisdiction */
- locj = settings->jurisdiction;
- if (NULL != locj)
+ /* Handle merchant address */
+ loca = settings->address;
+ if (NULL != loca)
+ {
+ loca = json_deep_copy (loca);
+ GNUNET_assert (0 ==
+ json_object_set_new (jm,
+ "address",
+ loca));
+ }
+ }
{
- locj = json_deep_copy (locj);
- GNUNET_assert (0 ==
- json_object_set_new (jmerchant,
- "jurisdiction",
- locj));
+ json_t *locj;
+
+ /* Handle merchant jurisdiction */
+ locj = settings->jurisdiction;
+ if (NULL != locj)
+ {
+ locj = json_deep_copy (locj);
+ GNUNET_assert (0 ==
+ json_object_set_new (jm,
+ "jurisdiction",
+ locj));
+ }
}
+ GNUNET_assert (0 ==
+ json_object_set_new (order,
+ "merchant",
+ jm));
}
- GNUNET_assert (0 ==
- json_object_set_new (order,
- "merchant",
- jmerchant));
/* add fields to the contract that the backend should provide */
GNUNET_assert (0 ==