/*
This file is part of GNUnet.
- Copyright (C) 2009, 2013 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2009, 2013, 2016 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 revocation/test_revocation.c
static void
-do_shutdown (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+do_shutdown (void *cls)
{
unsigned int c;
static void
-check_revocation (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+check_revocation (void *cls);
static void
static void
-check_revocation (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+check_revocation (void *cls)
{
GNUNET_REVOCATION_query (testpeers[0].cfg,
&testpeers[1].pubkey,
{
fprintf (stderr,
"Revocation successful\n");
- check_revocation (NULL, NULL);
+ check_revocation (NULL);
}
}
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
struct TestPeer *me = cls;
+
me->cfg = cfg;
- me->idh = GNUNET_IDENTITY_connect (cfg, NULL, NULL );
+ me->idh = GNUNET_IDENTITY_connect (cfg, NULL, NULL);
if (NULL == me->idh)
- GNUNET_log(GNUNET_ERROR_TYPE_ERROR,
- "Failed to create IDENTITY handle \n");
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Failed to create IDENTITY handle \n");
return me->idh;
}
}
-static void
+static void *
connect_cb (void *cls,
- const struct GNUNET_PeerIdentity *peer)
+ const struct GNUNET_PeerIdentity *peer,
+ struct GNUNET_MQ_Handle *mq)
{
static int connects = 0;
&identity_disconnect_adapter,
&testpeers[1]);
}
+ return NULL;
}
struct TestPeer *me = cls;
me->cfg = cfg;
- me->ch = GNUNET_CORE_connect (cfg, me, NULL,
- &connect_cb, NULL,
- NULL, GNUNET_NO,
- NULL, GNUNET_NO,
+ me->ch = GNUNET_CORE_connect (cfg,
+ me,
+ NULL,
+ &connect_cb,
+ NULL,
NULL);
if (NULL == me->ch)
GNUNET_log(GNUNET_ERROR_TYPE_ERROR,
{
unsigned int c;
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES,
- &do_shutdown, NULL);
-
+ GNUNET_SCHEDULER_add_shutdown (&do_shutdown,
+ NULL);
if (NUM_TEST_PEERS != num_peers)
{
ok = 4;