/*
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.
*/
/**
* Task run during shutdown.
*
* @param cls unused
- * @param tc unused
*/
static void
-shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+shutdown_task (void *cls)
{
struct Ego *e;
{
GNUNET_CONTAINER_DLL_remove (ego_head, ego_tail, e);
GNUNET_free (e->pk);
+ GNUNET_free (e->identifier);
GNUNET_free (e);
}
}
{
sdm = create_set_default_message (ego,
name);
- GNUNET_SERVER_notification_context_broadcast (nc, &sdm->header, GNUNET_NO);
+ GNUNET_SERVER_notification_context_unicast (nc, client,
+ &sdm->header, GNUNET_NO);
GNUNET_free (sdm);
GNUNET_SERVER_receive_done (client, GNUNET_OK);
GNUNET_free (identifier);
ego = GNUNET_new (struct Ego);
ego->pk = GNUNET_CRYPTO_ecdsa_key_create_from_file (filename);
if (NULL == ego->pk)
- {
- GNUNET_free (ego);
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- _("Failed to parse ego information in `%s'\n"),
- filename);
- return GNUNET_OK;
- }
+ {
+ GNUNET_free (ego);
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ _("Failed to parse ego information in `%s'\n"),
+ filename);
+ return GNUNET_OK;
+ }
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Loaded ego `%s'\n",
fn + 1);
GNUNET_DISK_directory_scan (ego_directory,
&process_ego_file,
NULL);
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task,
- NULL);
+ GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
+ NULL);
}