/*
This file is part of GNUnet.
- (C) 2013 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2013 GNUnet e.V.
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
*/
/**
* @file identity/gnunet-identity.c
* Task run on shutdown.
*
* @param cls NULL
- * @param tc unused
*/
static void
-shutdown_task (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+shutdown_task (void *cls)
{
if (NULL != set_op)
{
{
GNUNET_IDENTITY_cancel (delete_op);
delete_op = NULL;
- }
+ }
GNUNET_IDENTITY_disconnect (sh);
sh = NULL;
}
(NULL == set_op) &&
(NULL == set_ego) &&
(! list) &&
- (! monitor) )
+ (! monitor) )
GNUNET_SCHEDULER_shutdown ();
}
* 'ego' does indicate an error (i.e. name is taken or no default
* value is known). If 'ego' is non-NULL and if '*ctx'
* is set in those callbacks, the value WILL be passed to a subsequent
- * call to the identity callback of 'GNUNET_IDENTITY_connect' (if
+ * call to the identity callback of 'GNUNET_IDENTITY_connect' (if
* that one was not NULL).
*
* When an identity is renamed, this function is called with the
- * (known) ego but the NEW identifier.
+ * (known) ego but the NEW identifier.
*
* When an identity is deleted, this function is called with the
* (known) ego and "NULL" for the 'identifier'. In this case,
void **ctx,
const char *identifier)
{
- struct GNUNET_CRYPTO_EccPublicKey pk;
+ struct GNUNET_CRYPTO_EcdsaPublicKey pk;
char *s;
if ( (NULL != set_ego) &&
(NULL != ego) &&
(NULL != identifier) &&
- (0 == strcmp (identifier,
+ (0 == strcmp (identifier,
set_ego)) )
{
set_op = GNUNET_IDENTITY_set (sh,
if (NULL == ego)
return;
GNUNET_IDENTITY_ego_get_public_key (ego, &pk);
- s = GNUNET_CRYPTO_ecc_public_key_to_string (&pk);
+ s = GNUNET_CRYPTO_ecdsa_public_key_to_string (&pk);
if ( (monitor) || (NULL != identifier) )
fprintf (stdout, "%s - %s\n", identifier, s);
GNUNET_free (s);
create_ego,
&create_finished,
&create_op);
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
- &shutdown_task, NULL);
+ GNUNET_SCHEDULER_add_shutdown (&shutdown_task, NULL);
test_finished ();
}
{'m', "monitor", NULL,
gettext_noop ("run in monitor mode egos"),
0, &GNUNET_GETOPT_set_one, &monitor},
- {'s', "set", "SUBSYSYSTEM",
+ {'s', "set", "SUBSYSTEM",
gettext_noop ("set default identity to EGO for a subsystem SUBSYSTEM (use together with -e)"),
1, &GNUNET_GETOPT_set_string, &set_subsystem},
GNUNET_GETOPT_OPTION_END
return 2;
res = GNUNET_PROGRAM_run (argc, argv, "gnunet-identity",
- gettext_noop ("Maintain egos"),
+ gettext_noop ("Maintain egos"),
options, &run,
NULL);
GNUNET_free ((void *) argv);