From 40826ec2467ee0e6e4b89c0d073aebf5af99099c Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 30 Jul 2016 17:41:15 +0000 Subject: [PATCH] converting transport tests to hello_get API --- src/transport/transport-testing.c | 14 ++++++++------ src/transport/transport-testing.h | 3 ++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/transport/transport-testing.c b/src/transport/transport-testing.c index defafbbc6..c0775a135 100644 --- a/src/transport/transport-testing.c +++ b/src/transport/transport-testing.c @@ -508,10 +508,11 @@ GNUNET_TRANSPORT_TESTING_start_peer (struct GNUNET_TRANSPORT_TESTING_Handle *tth GNUNET_TRANSPORT_TESTING_stop_peer (p); return NULL; } - p->ghh = GNUNET_TRANSPORT_get_hello (p->cfg, - &get_hello, + p->ghh = GNUNET_TRANSPORT_hello_get (p->cfg, + GNUNET_TRANSPORT_AC_ANY, + &get_hello, p); - GNUNET_assert (p->ghh != NULL); + GNUNET_assert (NULL != p->ghh); return p; } @@ -539,7 +540,7 @@ GNUNET_TRANSPORT_TESTING_restart_peer (struct GNUNET_TRANSPORT_TESTING_PeerConte GNUNET_i2s (&p->id)); if (NULL != p->ghh) { - GNUNET_TRANSPORT_get_hello_cancel (p->ghh); + GNUNET_TRANSPORT_hello_get_cancel (p->ghh); p->ghh = NULL; } if (NULL != p->th) @@ -603,7 +604,8 @@ GNUNET_TRANSPORT_TESTING_restart_peer (struct GNUNET_TRANSPORT_TESTING_PeerConte NULL); GNUNET_assert (NULL != p->th); p->ats = GNUNET_ATS_connectivity_init (p->cfg); - p->ghh = GNUNET_TRANSPORT_get_hello (p->cfg, + p->ghh = GNUNET_TRANSPORT_hello_get (p->cfg, + GNUNET_TRANSPORT_AC_ANY, &get_hello, p); GNUNET_assert (NULL != p->ghh); @@ -632,7 +634,7 @@ GNUNET_TRANSPORT_TESTING_stop_peer (struct GNUNET_TRANSPORT_TESTING_PeerContext } if (NULL != p->ghh) { - GNUNET_TRANSPORT_get_hello_cancel (p->ghh); + GNUNET_TRANSPORT_hello_get_cancel (p->ghh); p->ghh = NULL; } if (NULL != p->tmh) diff --git a/src/transport/transport-testing.h b/src/transport/transport-testing.h index 87e647c2f..cb5ad319c 100644 --- a/src/transport/transport-testing.h +++ b/src/transport/transport-testing.h @@ -31,6 +31,7 @@ #include "gnunet_hello_lib.h" #include "gnunet_transport_service.h" #include "gnunet_transport_core_service.h" +#include "gnunet_transport_hello_service.h" #include "gnunet_transport_manipulation_service.h" #include "gnunet_testing_lib.h" @@ -91,7 +92,7 @@ struct GNUNET_TRANSPORT_TESTING_PeerContext /** * Peer's transport get hello handle to retrieve peer's HELLO message */ - struct GNUNET_TRANSPORT_GetHelloHandle *ghh; + struct GNUNET_TRANSPORT_HelloGetHandle *ghh; /** * Peer's testing handle -- 2.25.1