From 3cb27ec610d2894f1fbf7915fb88d6f797add266 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Wed, 5 Dec 2012 16:23:58 +0000 Subject: [PATCH] changes --- src/ats/Makefile.am | 20 +++++++------- .../test_ats_api_scheduling_destroy_session.c | 26 ++----------------- 2 files changed, 13 insertions(+), 33 deletions(-) diff --git a/src/ats/Makefile.am b/src/ats/Makefile.am index c3bf4afcb..629a46602 100644 --- a/src/ats/Makefile.am +++ b/src/ats/Makefile.am @@ -60,9 +60,9 @@ gnunet_service_ats_DEPENDENCIES = \ check_PROGRAMS = \ test_ats_api_scheduling_init \ test_ats_api_scheduling_add_address \ - test_ats_api_scheduling_destroy_address -# test_ats_api_scheduling \ -# test_ats_api_scheduling_destroy_session \ + test_ats_api_scheduling_destroy_address \ + test_ats_api_scheduling_destroy_session +# test_ats_api_scheduling \ # test_ats_api_reset_backoff \ # test_ats_api_performance \ # $(GN_MLP_TEST) \ @@ -89,6 +89,13 @@ test_ats_api_scheduling_destroy_address_LDADD = \ $(top_builddir)/src/testing/libgnunettesting.la \ $(top_builddir)/src/ats/libgnunetats.la +test_ats_api_scheduling_destroy_session_SOURCES = \ + test_ats_api_scheduling_destroy_session.c +test_ats_api_scheduling_destroy_session_LDADD = \ + $(top_builddir)/src/util/libgnunetutil.la \ + $(top_builddir)/src/testing/libgnunettesting.la \ + $(top_builddir)/src/ats/libgnunetats.la + if HAVE_LIBGLPK #test_ats_mlp_SOURCES = \ # $(GN_MLP_SRC) \ @@ -144,12 +151,7 @@ test_ats_api_scheduling_add_address_LDADD = \ # $(top_builddir)/src/testing/libgnunettesting.la \ # $(top_builddir)/src/ats/libgnunetats.la -#test_ats_api_scheduling_destroy_session_SOURCES = \ -# test_ats_api_scheduling_destroy_session.c -#test_ats_api_scheduling_destroy_session_LDADD = \ -# $(top_builddir)/src/util/libgnunetutil.la \ -# $(top_builddir)/src/testing/libgnunettesting.la \ -# $(top_builddir)/src/ats/libgnunetats.la + #test_ats_api_scheduling_get_type_SOURCES = \ # test_ats_api_scheduling_get_type.c diff --git a/src/ats/test_ats_api_scheduling_destroy_session.c b/src/ats/test_ats_api_scheduling_destroy_session.c index 722102b32..ac08bf23a 100644 --- a/src/ats/test_ats_api_scheduling_destroy_session.c +++ b/src/ats/test_ats_api_scheduling_destroy_session.c @@ -29,8 +29,8 @@ #include "gnunet_ats_service.h" #include "gnunet_testing_lib-new.h" #include "ats.h" +#include "test_ats_api_common.h" -#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10) static GNUNET_SCHEDULER_TaskIdentifier die_task; @@ -40,29 +40,7 @@ static int ret; static int stage; -struct Address -{ - char *plugin; - size_t plugin_len; - - void *addr; - size_t addr_len; - - struct GNUNET_ATS_Information *ats; - int ats_count; - - void *session; -}; - -struct PeerContext -{ - struct GNUNET_PeerIdentity id; - - struct Address *addr; -}; - - -static struct Address test_addr; +static struct Test_Address test_addr; static struct PeerContext p; -- 2.25.1