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.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/src/backend/taler-merchant-httpd_private-post-orders.c b/src/backend/taler-merchant-httpd_private-post-orders.c
index d6290eff..2706e511 100644
--- a/src/backend/taler-merchant-httpd_private-post-orders.c
+++ b/src/backend/taler-merchant-httpd_private-post-orders.c
@@ -1478,21 +1478,10 @@ TMH_private_post_orders (const struct TMH_RequestHandler *rh,
json_array_size (uuid));
for (unsigned int i = 0; i<uuids_len; i++)
{
- const char *error_name;
- unsigned int error_line;
- const char *uuidsi;
- struct GNUNET_JSON_Specification ispec[] = {
- GNUNET_JSON_spec_string ("uuid",
- &uuidsi),
- GNUNET_JSON_spec_end ()
- };
+ json_t *ui = json_array_get (uuid,
+ i);
- ret = GNUNET_JSON_parse (json_array_get (uuid,
- i),
- ispec,
- &error_name,
- &error_line);
- if (GNUNET_OK != ret)
+ if (! json_is_string (ui))
{
GNUNET_break_op (0);
GNUNET_array_grow (ips,
@@ -1503,16 +1492,14 @@ TMH_private_post_orders (const struct TMH_RequestHandler *rh,
0);
GNUNET_JSON_parse_free (spec);
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "UUID parsing failed at #%u: %s:%u\n",
- i,
- error_name,
- error_line);
+ "UUID parsing failed at #%u\n",
+ i);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
TALER_EC_GENERIC_PARAMETER_MALFORMED,
"lock_uuids");
}
- TMH_uuid_from_string (uuidsi,
+ TMH_uuid_from_string (json_string_value (ui),
&uuids[i]);
}
}