From c5bf6746a62e43d0c96fed6bc474f1e42f4c1540 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 29 Jul 2016 21:32:09 +0000 Subject: [PATCH] -convert to new transport API --- src/testbed/gnunet-daemon-testbed-underlay.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/testbed/gnunet-daemon-testbed-underlay.c b/src/testbed/gnunet-daemon-testbed-underlay.c index 93006d35e..0b6c44710 100644 --- a/src/testbed/gnunet-daemon-testbed-underlay.c +++ b/src/testbed/gnunet-daemon-testbed-underlay.c @@ -29,6 +29,7 @@ #include "platform.h" #include "gnunet_util_lib.h" #include "gnunet_transport_service.h" +#include "gnunet_transport_manipulation_service.h" #include "gnunet_ats_service.h" #include "gnunet_testing_lib.h" #include @@ -94,7 +95,7 @@ static void *hostkeys_data; /** * Handle to the transport service. This is used for setting link metrics */ -static struct GNUNET_TRANSPORT_Handle *transport; +static struct GNUNET_TRANSPORT_ManipulationHandle *transport; /** * The number of hostkeys in the hostkeys array @@ -287,7 +288,7 @@ do_shutdown (void *cls) { if (NULL != transport) { - GNUNET_TRANSPORT_disconnect (transport); + GNUNET_TRANSPORT_manipulation_disconnect (transport); transport = NULL; } cleanup_map (); @@ -398,7 +399,7 @@ run (void *cls, char *const *args, const char *cfgfile, if (GNUNET_OK != load_keys (c)) goto close_db; - transport = GNUNET_TRANSPORT_connect (c, NULL, NULL, NULL, NULL, NULL); + transport = GNUNET_TRANSPORT_manipulation_connect (c); if (NULL == transport) { GNUNET_break (0); @@ -410,7 +411,7 @@ run (void *cls, char *const *args, const char *cfgfile, nrows = db_read_whitelist (db, pid, &wl_head); if ((GNUNET_SYSERR == nrows) || (0 == nrows)) { - GNUNET_TRANSPORT_disconnect (transport); + GNUNET_TRANSPORT_manipulation_disconnect (transport); goto close_db; } map = GNUNET_CONTAINER_multipeermap_create (nrows, GNUNET_NO); @@ -426,11 +427,11 @@ run (void *cls, char *const *args, const char *cfgfile, DEBUG ("Setting %u ms latency to peer `%s'\n", wl_entry->latency, GNUNET_i2s (&identity)); - GNUNET_TRANSPORT_set_traffic_metric (transport, - &identity, - &prop, - delay, - delay); + GNUNET_TRANSPORT_manipulation_set (transport, + &identity, + &prop, + delay, + delay); GNUNET_free (wl_entry); } bh = GNUNET_TRANSPORT_blacklist (c, &check_access, NULL); -- 2.25.1