summaryrefslogtreecommitdiff
path: root/src/transport/test_transport_testing_startstop.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-07-09 22:34:49 +0000
committerChristian Grothoff <christian@grothoff.org>2016-07-09 22:34:49 +0000
commitc0b81510ffe194dc662c3a6267d5e66a69873c4b (patch)
tree5ad5cc473d6993523be80bcf1430230e224d9216 /src/transport/test_transport_testing_startstop.c
parenta7345f7436c421fd15e18e87ec399ea93b6dde03 (diff)
-start to refactor testcases for sanity
Diffstat (limited to 'src/transport/test_transport_testing_startstop.c')
-rw-r--r--src/transport/test_transport_testing_startstop.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/transport/test_transport_testing_startstop.c b/src/transport/test_transport_testing_startstop.c
index b30f8b5ec..6263f4d18 100644
--- a/src/transport/test_transport_testing_startstop.c
+++ b/src/transport/test_transport_testing_startstop.c
@@ -34,9 +34,9 @@
struct GNUNET_SCHEDULER_Task * timeout_task;
-static struct PeerContext *p;
+static struct GNUNET_TRANSPORT_TESTING_PeerContext *p;
-struct GNUNET_TRANSPORT_TESTING_handle *tth;
+struct GNUNET_TRANSPORT_TESTING_Handle *tth;
static int ret = 0;
@@ -48,7 +48,7 @@ end ()
if (timeout_task != NULL)
GNUNET_SCHEDULER_cancel (timeout_task);
- GNUNET_TRANSPORT_TESTING_stop_peer (tth, p);
+ GNUNET_TRANSPORT_TESTING_stop_peer (p);
GNUNET_TRANSPORT_TESTING_done (tth);
}
@@ -59,7 +59,7 @@ end_badly ()
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fail! Stopping peers\n");
if (NULL != p)
- GNUNET_TRANSPORT_TESTING_stop_peer (tth, p);
+ GNUNET_TRANSPORT_TESTING_stop_peer (p);
if (NULL != tth)
GNUNET_TRANSPORT_TESTING_done (tth);
@@ -69,7 +69,7 @@ end_badly ()
static void
-start_cb (struct PeerContext *p, void *cls)
+start_cb (struct GNUNET_TRANSPORT_TESTING_PeerContext *p, void *cls)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer %u (`%s') successfully started\n",
p->no,
@@ -89,13 +89,17 @@ run (void *cls, char *const *args, const char *cfgfile,
GNUNET_assert (NULL != tth);
timeout_task =
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES, &end_badly, NULL);
+ GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES,
+ &end_badly,
+ NULL);
- p = GNUNET_TRANSPORT_TESTING_start_peer(tth, cfgfile, 1,
+ p = GNUNET_TRANSPORT_TESTING_start_peer(tth,
+ cfgfile,
+ 1,
NULL, /* receive cb */
NULL, /* connect cb */
NULL, /* disconnect cb */
- start_cb, /* startup cb */
+ &start_cb, /* startup cb */
NULL); /* closure */
if (NULL == p)
{