This commit is contained in:
Christian Grothoff 2020-01-20 02:00:55 +01:00
parent f12ef85960
commit f45b1c912b
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -59,7 +59,6 @@ struct HTD_Context
* information for a given coin. Gets the linkage data and * information for a given coin. Gets the linkage data and
* builds the reply for the client. * builds the reply for the client.
* *
*
* @param cls closure, a `struct HTD_Context` * @param cls closure, a `struct HTD_Context`
* @param transfer_pub public transfer key for the session * @param transfer_pub public transfer key for the session
* @param ldl link data related to @a transfer_pub * @param ldl link data related to @a transfer_pub
@ -84,35 +83,33 @@ handle_link_data (void *cls,
{ {
json_t *obj; json_t *obj;
if (NULL == (obj = json_object ())) obj = json_pack ("{s:o, s:o, s:o}",
goto fail;
json_object_set_new (obj,
"denom_pub", "denom_pub",
GNUNET_JSON_from_rsa_public_key ( GNUNET_JSON_from_rsa_public_key
pos->denom_pub.rsa_public_key)); (pos->denom_pub.rsa_public_key),
json_object_set_new (obj,
"ev_sig", "ev_sig",
GNUNET_JSON_from_rsa_signature ( GNUNET_JSON_from_rsa_signature
pos->ev_sig.rsa_signature)); (pos->ev_sig.rsa_signature),
json_object_set_new (obj,
"link_sig", "link_sig",
GNUNET_JSON_from_data_auto (&pos->orig_coin_link_sig)); GNUNET_JSON_from_data_auto (&pos->orig_coin_link_sig));
if (0 != if ( (NULL == obj) ||
(0 !=
json_array_append_new (list, json_array_append_new (list,
obj)) obj)) )
{
json_decref (list);
goto fail; goto fail;
} }
if (NULL == (root = json_object ())) }
goto fail; root = json_pack ("{s:o, s:o}",
json_object_set_new (root,
"new_coins", "new_coins",
list); list,
json_object_set_new (root,
"transfer_pub", "transfer_pub",
GNUNET_JSON_from_data_auto (transfer_pub)); GNUNET_JSON_from_data_auto (transfer_pub));
if (0 != if ( (NULL == root) ||
(0 !=
json_array_append_new (ctx->mlist, json_array_append_new (ctx->mlist,
root)) root)) )
goto fail; goto fail;
return; return;
fail: fail: