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; "denom_pub",
json_object_set_new (obj, GNUNET_JSON_from_rsa_public_key
"denom_pub", (pos->denom_pub.rsa_public_key),
GNUNET_JSON_from_rsa_public_key ( "ev_sig",
pos->denom_pub.rsa_public_key)); GNUNET_JSON_from_rsa_signature
json_object_set_new (obj, (pos->ev_sig.rsa_signature),
"ev_sig", "link_sig",
GNUNET_JSON_from_rsa_signature ( GNUNET_JSON_from_data_auto (&pos->orig_coin_link_sig));
pos->ev_sig.rsa_signature)); if ( (NULL == obj) ||
json_object_set_new (obj, (0 !=
"link_sig", json_array_append_new (list,
GNUNET_JSON_from_data_auto (&pos->orig_coin_link_sig)); obj)) )
if (0 != {
json_array_append_new (list, json_decref (list);
obj))
goto fail; goto fail;
}
} }
if (NULL == (root = json_object ())) root = json_pack ("{s:o, s:o}",
goto fail; "new_coins",
json_object_set_new (root, list,
"new_coins", "transfer_pub",
list); GNUNET_JSON_from_data_auto (transfer_pub));
json_object_set_new (root, if ( (NULL == root) ||
"transfer_pub", (0 !=
GNUNET_JSON_from_data_auto (transfer_pub)); json_array_append_new (ctx->mlist,
if (0 != root)) )
json_array_append_new (ctx->mlist,
root))
goto fail; goto fail;
return; return;
fail: fail: