diff options
Diffstat (limited to 'src/ats/test_ats_mlp_averaging.c')
-rw-r--r-- | src/ats/test_ats_mlp_averaging.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/ats/test_ats_mlp_averaging.c b/src/ats/test_ats_mlp_averaging.c index f7b7b1d..97e9aa7 100644 --- a/src/ats/test_ats_mlp_averaging.c +++ b/src/ats/test_ats_mlp_averaging.c @@ -30,9 +30,6 @@ #include "gnunet_ats_service.h" #include "gnunet-service-ats_addresses_mlp.h" -#define VERBOSE GNUNET_YES -#define VERBOSE_ARM GNUNET_NO - #define MLP_MAX_EXEC_DURATION GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 3) #define MLP_MAX_ITERATIONS INT_MAX @@ -52,7 +49,7 @@ create_address (struct ATS_Address *addr, char * plugin, int ats_count, struct G addr->mlp_information = NULL; addr->next = NULL; addr->prev = NULL; - addr->plugin = strdup (plugin); + addr->plugin = GNUNET_strdup (plugin); addr->ats_count = ats_count; addr->ats = ats; } @@ -76,6 +73,7 @@ check (void *cls, char *const *args, const char *cfgfile, struct ATS_Address addr[10]; struct ATS_PreferedAddress *res[10]; struct MLP_information *mlpi; + struct GAS_MLP_SolutionContext ctx; stats = GNUNET_STATISTICS_create("ats", cfg); @@ -129,7 +127,9 @@ check (void *cls, char *const *args, const char *cfgfile, GNUNET_assert (mlp->addr_in_problem == 1); - GNUNET_assert (GNUNET_OK == GAS_mlp_solve_problem(mlp)); + GNUNET_assert (GNUNET_OK == GAS_mlp_solve_problem(mlp, &ctx)); + GNUNET_assert (GNUNET_OK == ctx.lp_result); + GNUNET_assert (GNUNET_OK == ctx.mlp_result); res[0] = GAS_mlp_get_preferred_address(mlp, addresses, &p[0]); GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Preferred address `%s' outbound bandwidth: %u Bps\n",res[0]->address->plugin, res[0]->bandwidth_out); @@ -159,11 +159,7 @@ main (int argc, char *argv[]) static char *const argv2[] = { "test_ats_mlp", "-c", "test_ats_api.conf", -#if VERBOSE - "-L", "DEBUG", -#else "-L", "WARNING", -#endif NULL }; |