/*
This file is part of GNUnet.
- Copyright (C) 2010, 2012, 2015 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2010, 2012, 2015 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
static void
-do_stop (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+do_stop (void *cls)
{
struct GNUNET_TIME_Relative del;
char *fancy;
fancy);
GNUNET_free (fancy);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Finished download, shutting down\n",
- (unsigned long long) FILESIZE);
+ "Finished download, shutting down\n");
}
}
static void
-stop_source_peer (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+stop_source_peer (void *cls)
{
struct DownloadContext *dc = cls;
- /* Do not interact with testbed when shutting down */
- if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
- return;
+ /* FIXME: We should not interact with testbed when shutting down */
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Stopping source peer\n");
- op = GNUNET_TESTBED_peer_stop (NULL, daemons[1], &do_download, dc);
+ op = GNUNET_TESTBED_peer_stop (NULL,
+ daemons[1],
+ &do_download, dc);
GNUNET_assert (NULL != op);
}
dc->uri = GNUNET_FS_uri_dup (uri);
if (NULL != fn)
dc->fn = GNUNET_strdup (fn);
- (void) GNUNET_SCHEDULER_add_delayed (MIGRATION_DELAY, &stop_source_peer, dc);
+ (void) GNUNET_SCHEDULER_add_delayed (MIGRATION_DELAY,
+ &stop_source_peer,
+ dc);
}
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Publishing %llu bytes\n",
(unsigned long long) FILESIZE);
- GNUNET_FS_TEST_publish (daemons[1], TIMEOUT, 1, GNUNET_NO, FILESIZE, SEED,
+ GNUNET_FS_TEST_publish (daemons[1], TIMEOUT, 1, GNUNET_NO,
+ FILESIZE, SEED,
VERBOSE, &do_wait, NULL);
}