diff options
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-post-orders.c')
-rw-r--r-- | src/backend/taler-merchant-httpd_private-post-orders.c | 25 |
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, | |||
1478 | json_array_size (uuid)); | 1478 | json_array_size (uuid)); |
1479 | for (unsigned int i = 0; i<uuids_len; i++) | 1479 | for (unsigned int i = 0; i<uuids_len; i++) |
1480 | { | 1480 | { |
1481 | const char *error_name; | 1481 | json_t *ui = json_array_get (uuid, |
1482 | unsigned int error_line; | 1482 | i); |
1483 | const char *uuidsi; | ||
1484 | struct GNUNET_JSON_Specification ispec[] = { | ||
1485 | GNUNET_JSON_spec_string ("uuid", | ||
1486 | &uuidsi), | ||
1487 | GNUNET_JSON_spec_end () | ||
1488 | }; | ||
1489 | 1483 | ||
1490 | ret = GNUNET_JSON_parse (json_array_get (uuid, | 1484 | if (! json_is_string (ui)) |
1491 | i), | ||
1492 | ispec, | ||
1493 | &error_name, | ||
1494 | &error_line); | ||
1495 | if (GNUNET_OK != ret) | ||
1496 | { | 1485 | { |
1497 | GNUNET_break_op (0); | 1486 | GNUNET_break_op (0); |
1498 | GNUNET_array_grow (ips, | 1487 | GNUNET_array_grow (ips, |
@@ -1503,16 +1492,14 @@ TMH_private_post_orders (const struct TMH_RequestHandler *rh, | |||
1503 | 0); | 1492 | 0); |
1504 | GNUNET_JSON_parse_free (spec); | 1493 | GNUNET_JSON_parse_free (spec); |
1505 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 1494 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
1506 | "UUID parsing failed at #%u: %s:%u\n", | 1495 | "UUID parsing failed at #%u\n", |
1507 | i, | 1496 | i); |
1508 | error_name, | ||
1509 | error_line); | ||
1510 | return TALER_MHD_reply_with_error (connection, | 1497 | return TALER_MHD_reply_with_error (connection, |
1511 | MHD_HTTP_BAD_REQUEST, | 1498 | MHD_HTTP_BAD_REQUEST, |
1512 | TALER_EC_GENERIC_PARAMETER_MALFORMED, | 1499 | TALER_EC_GENERIC_PARAMETER_MALFORMED, |
1513 | "lock_uuids"); | 1500 | "lock_uuids"); |
1514 | } | 1501 | } |
1515 | TMH_uuid_from_string (uuidsi, | 1502 | TMH_uuid_from_string (json_string_value (ui), |
1516 | &uuids[i]); | 1503 | &uuids[i]); |
1517 | } | 1504 | } |
1518 | } | 1505 | } |