From 928c054ec2ba5dc26ff6c3df3e638488a04f3ca9 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Tue, 30 Nov 2010 12:30:20 +0000 Subject: [PATCH] added api changes to testcases --- src/transport/gnunet-service-transport.c | 8 ++++---- src/transport/test_quota_compliance.c | 6 ++---- src/transport/test_transport_api.c | 6 ++---- src/transport/test_transport_api_reliability.c | 6 ++---- 4 files changed, 10 insertions(+), 16 deletions(-) diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 990b50477..8b7726894 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c @@ -3680,14 +3680,14 @@ check_pending_validation (void *cls, if (NULL != (prem = n->pre_connect_message_buffer)) { n->pre_connect_message_buffer = NULL; + /* struct GNUNET_TRANSPORT_ATS_Information * ats = GNUNET_malloc(2 * sizeof(struct GNUNET_TRANSPORT_ATS_Information)); ats[0].type = htonl(GNUNET_TRANSPORT_LATENCY_LSB); ats[0].value = htonl(n->latency.rel_value); ats[1].type = htonl(GNUNET_TRANSPORT_DISTANCE); - ats[1].value = htonl(n->distance); - handle_payload_message (prem, n, ats, 2); - fprintf(stderr,"ATS!"); - GNUNET_free (ats); + ats[1].value = htonl(n->distance);*/ + handle_payload_message (prem, n, NULL, 0); + //GNUNET_free (ats); GNUNET_free (prem); } } diff --git a/src/transport/test_quota_compliance.c b/src/transport/test_quota_compliance.c index cc13bac80..e4b728007 100644 --- a/src/transport/test_quota_compliance.c +++ b/src/transport/test_quota_compliance.c @@ -244,8 +244,7 @@ static void notify_receive_new (void *cls, const struct GNUNET_PeerIdentity *peer, const struct GNUNET_MessageHeader *message, - struct GNUNET_TIME_Relative latency, - uint32_t distance) + const struct GNUNET_TRANSPORT_ATS_Information *ats, uint32_t ats_count) { unsigned int s; const struct TestMessage *hdr; @@ -538,8 +537,7 @@ static void measure (unsigned long long quota_p1, unsigned long long quota_p2 ) static void notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, - struct GNUNET_TIME_Relative latency, - uint32_t distance) + const struct GNUNET_TRANSPORT_ATS_Information *ats, uint32_t ats_count) { if (cls == &p1) { diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c index e429ad7a7..488471e7a 100644 --- a/src/transport/test_transport_api.c +++ b/src/transport/test_transport_api.c @@ -140,8 +140,7 @@ static void notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, const struct GNUNET_MessageHeader *message, - struct GNUNET_TIME_Relative latency, - uint32_t distance) + const struct GNUNET_TRANSPORT_ATS_Information *ats, uint32_t ats_count) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ok is (%d)!\n", ok); @@ -186,8 +185,7 @@ notify_ready (void *cls, size_t size, void *buf) static void notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, - struct GNUNET_TIME_Relative latency, - uint32_t distance) + const struct GNUNET_TRANSPORT_ATS_Information *ats, uint32_t ats_count) { if (cls == &p1) { diff --git a/src/transport/test_transport_api_reliability.c b/src/transport/test_transport_api_reliability.c index 063d1d3bb..e67399f71 100644 --- a/src/transport/test_transport_api_reliability.c +++ b/src/transport/test_transport_api_reliability.c @@ -185,8 +185,7 @@ static void notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer, const struct GNUNET_MessageHeader *message, - struct GNUNET_TIME_Relative latency, - uint32_t distance) + const struct GNUNET_TRANSPORT_ATS_Information *ats, uint32_t ats_count) { static int n; unsigned int s; @@ -324,8 +323,7 @@ notify_ready (void *cls, size_t size, void *buf) static void notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer, - struct GNUNET_TIME_Relative latency, - uint32_t distance) + const struct GNUNET_TRANSPORT_ATS_Information *ats, uint32_t ats_count) { if (cls == &p1) { -- 2.25.1