From db6c313c75a36bc4a27971d7bd8da3e938c7c02a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 13 Nov 2010 20:37:37 +0000 Subject: the big core API/protocol change, breaks all testcases using core, since the code is still buggy --- src/hostlist/gnunet-daemon-hostlist.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'src/hostlist/gnunet-daemon-hostlist.c') diff --git a/src/hostlist/gnunet-daemon-hostlist.c b/src/hostlist/gnunet-daemon-hostlist.c index 8c3bb9be7..bd76b17d3 100644 --- a/src/hostlist/gnunet-daemon-hostlist.c +++ b/src/hostlist/gnunet-daemon-hostlist.c @@ -141,13 +141,12 @@ core_init (void *cls, * Core handler for p2p hostlist advertisements */ static int advertisement_handler (void *cls, - const struct GNUNET_PeerIdentity * peer, - const struct GNUNET_MessageHeader * message, - struct GNUNET_TIME_Relative latency, - uint32_t distance) + const struct GNUNET_PeerIdentity * peer, + const struct GNUNET_MessageHeader * message, + const struct GNUNET_TRANSPORT_ATS_Information *atsi) { GNUNET_assert (NULL != client_adv_handler); - return (*client_adv_handler) (cls, peer, message, latency, distance); + return (*client_adv_handler) (cls, peer, message, atsi); } @@ -156,23 +155,21 @@ static int advertisement_handler (void *cls, * * @param cls closure * @param peer peer identity this notification is about - * @param latency reported latency of the connection with 'other' - * @param distance reported distance (DV) to 'other' + * @param atsi performance data */ static void connect_handler (void *cls, const struct GNUNET_PeerIdentity * peer, - struct GNUNET_TIME_Relative latency, - uint32_t distance) + const struct GNUNET_TRANSPORT_ATS_Information *atsi) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "A new peer connected, notifying client and server\n"); if ( NULL != client_ch) - (*client_ch) (cls, peer, latency, distance); + (*client_ch) (cls, peer, atsi); #if HAVE_MHD if ( NULL != server_ch) - (*server_ch) (cls, peer, latency, distance); + (*server_ch) (cls, peer, atsi); #endif } @@ -270,7 +267,6 @@ run (void *cls, core = GNUNET_CORE_connect (cfg, 1, - GNUNET_TIME_UNIT_FOREVER_REL, NULL, &core_init, &connect_handler, &disconnect_handler, NULL, -- cgit v1.2.3