diff options
Diffstat (limited to 'src/lib/testing_api_cmd_proposal.c')
-rw-r--r-- | src/lib/testing_api_cmd_proposal.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/testing_api_cmd_proposal.c b/src/lib/testing_api_cmd_proposal.c index 71a02061..9f2d6d8c 100644 --- a/src/lib/testing_api_cmd_proposal.c +++ b/src/lib/testing_api_cmd_proposal.c @@ -359,16 +359,14 @@ proposal_run (void *cls, struct GNUNET_TIME_Absolute now; char *order_id; + // FIXME: should probably use get_monotone() to ensure uniqueness! now = GNUNET_TIME_absolute_get (); - order_id = GNUNET_STRINGS_data_to_string_alloc (&now.abs_value_us, sizeof (now.abs_value_us)); - - json_object_set (order, - "order_id", - json_string (order_id)); - + json_object_set_new (order, + "order_id", + json_string (order_id)); GNUNET_free (order_id); } @@ -379,6 +377,7 @@ proposal_run (void *cls, if (NULL != ps->instance) { json_t *merchant; + merchant = json_object (); json_object_set_new (merchant, "instance", @@ -397,6 +396,7 @@ proposal_run (void *cls, GNUNET_assert (NULL != ps->po); } + /** * Free the state of a "proposal" CMD, and possibly * cancel it if it did not complete. |