X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fidentity%2Fgnunet-identity.c;h=f632aa0a8d76979ee8d9c0d237e85858506eedb3;hb=60790f6e89914decc21c850d07aef9be237a6c41;hp=66dc1909ee38ce8f6a3b82dfc26b26c0e059ff79;hpb=a35c5a11d32bdd0bc24f64de36fbc6b0d0b20aae;p=oweals%2Fgnunet.git diff --git a/src/identity/gnunet-identity.c b/src/identity/gnunet-identity.c index 66dc1909e..f632aa0a8 100644 --- a/src/identity/gnunet-identity.c +++ b/src/identity/gnunet-identity.c @@ -1,6 +1,6 @@ /* 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 @@ -14,8 +14,8 @@ 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 @@ -84,11 +84,9 @@ static struct GNUNET_IDENTITY_Operation *delete_op; * 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) { @@ -104,7 +102,7 @@ shutdown_task (void *cls, { GNUNET_IDENTITY_cancel (delete_op); delete_op = NULL; - } + } GNUNET_IDENTITY_disconnect (sh); sh = NULL; } @@ -121,7 +119,7 @@ test_finished () (NULL == set_op) && (NULL == set_ego) && (! list) && - (! monitor) ) + (! monitor) ) GNUNET_SCHEDULER_shutdown (); } @@ -201,11 +199,11 @@ set_done (void *cls, * '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, @@ -226,13 +224,13 @@ print_ego (void *cls, void **ctx, const char *identifier) { - struct GNUNET_CRYPTO_EccPublicSignKey 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, @@ -267,7 +265,7 @@ print_ego (void *cls, 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); @@ -304,8 +302,7 @@ run (void *cls, char *const *args, const char *cfgfile, 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 (); } @@ -338,7 +335,7 @@ main (int argc, char *const *argv) {'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 @@ -348,7 +345,7 @@ main (int argc, char *const *argv) 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);