along with this program. If not, see <http://www.gnu.org/licenses/>.
SPDX-License-Identifier: AGPL3.0-or-later
- */
+ */
/**
* @author Martin Schanzenbach
* @file src/reclaim/gnunet-reclaim.c
ticket_issue_cb (void *cls, const struct GNUNET_RECLAIM_Ticket *ticket)
{
char *ticket_str;
+
reclaim_op = NULL;
if (NULL != ticket)
{
ticket_str =
GNUNET_STRINGS_data_to_string_alloc (ticket,
- sizeof (
+ sizeof(
struct GNUNET_RECLAIM_Ticket));
printf ("%s\n", ticket_str);
GNUNET_free (ticket_str);
attr->data,
attr->data_size);
attr_type = GNUNET_RECLAIM_ATTRIBUTE_number_to_typename (attr->type);
- id = GNUNET_STRINGS_data_to_string_alloc (&attr->id, sizeof (uint64_t));
+ id = GNUNET_STRINGS_data_to_string_alloc (&attr->id, sizeof(uint64_t));
fprintf (stdout,
"Name: %s; Value: %s (%s); Version %u; ID: %s\n",
attr->name,
aud =
GNUNET_STRINGS_data_to_string_alloc (&ticket->audience,
- sizeof (struct
- GNUNET_CRYPTO_EcdsaPublicKey));
- ref = GNUNET_STRINGS_data_to_string_alloc (&ticket->rnd, sizeof (uint64_t));
+ sizeof(struct
+ GNUNET_CRYPTO_EcdsaPublicKey));
+ ref = GNUNET_STRINGS_data_to_string_alloc (&ticket->rnd, sizeof(uint64_t));
tkt =
GNUNET_STRINGS_data_to_string_alloc (ticket,
- sizeof (struct GNUNET_RECLAIM_Ticket));
+ sizeof(struct GNUNET_RECLAIM_Ticket));
fprintf (stdout, "Ticket: %s | ID: %s | Audience: %s\n", tkt, ref, aud);
GNUNET_free (aud);
GNUNET_free (ref);
}
else if (attr_delete && (NULL == attr_to_delete))
{
- label = GNUNET_STRINGS_data_to_string_alloc (&attr->id, sizeof (uint64_t));
+ label = GNUNET_STRINGS_data_to_string_alloc (&attr->id, sizeof(uint64_t));
if (0 == strcasecmp (attr_delete, label))
{
attr_to_delete = GNUNET_RECLAIM_ATTRIBUTE_claim_new (attr->name,
attr->data,
attr->data_size);
attr_type = GNUNET_RECLAIM_ATTRIBUTE_number_to_typename (attr->type);
- id = GNUNET_STRINGS_data_to_string_alloc (&attr->id, sizeof (uint64_t));
+ id = GNUNET_STRINGS_data_to_string_alloc (&attr->id, sizeof(uint64_t));
fprintf (stdout,
"Name: %s; Value: %s (%s); Version %u; ID: %s\n",
attr->name,
}
if ((NULL != rp) &&
- GNUNET_OK !=
- GNUNET_CRYPTO_ecdsa_public_key_from_string (rp, strlen (rp), &rp_key))
+ (GNUNET_OK !=
+ GNUNET_CRYPTO_ecdsa_public_key_from_string (rp, strlen (rp), &rp_key)) )
{
fprintf (stderr, "%s is not a public key!\n", rp);
cleanup_task = GNUNET_SCHEDULER_add_now (&do_cleanup, NULL);
GNUNET_STRINGS_string_to_data (consume_ticket,
strlen (consume_ticket),
&ticket,
- sizeof (struct GNUNET_RECLAIM_Ticket));
+ sizeof(struct GNUNET_RECLAIM_Ticket));
if (NULL != revoke_ticket)
GNUNET_STRINGS_string_to_data (revoke_ticket,
strlen (revoke_ticket),
&ticket,
- sizeof (struct GNUNET_RECLAIM_Ticket));
+ sizeof(struct GNUNET_RECLAIM_Ticket));
attr_list = GNUNET_new (struct GNUNET_RECLAIM_ATTRIBUTE_ClaimList);
claim = NULL;
{
exp_interval = GNUNET_TIME_UNIT_HOURS;
struct GNUNET_GETOPT_CommandLineOption options[] = {
-
GNUNET_GETOPT_option_string ('a',
"add",
"NAME",
"Expiration interval of the attribute"),
&exp_interval),
- GNUNET_GETOPT_OPTION_END};
+ GNUNET_GETOPT_OPTION_END
+ };
if (GNUNET_OK != GNUNET_PROGRAM_run (argc,
argv,
"gnunet-reclaim",