static struct GNUNET_CONTAINER_MultiHashMap *addresses;
+#if HAVE_LIBGLPK
+static struct GAS_MLP_Handle *mlp;
+#endif
+
static unsigned long long wan_quota_in;
static unsigned long long wan_quota_out;
#if HAVE_LIBGLPK
if (ats_mode == MLP)
- GAS_mlp_address_delete (addresses, addr);
+ GAS_mlp_address_delete (mlp, addresses, addr);
#endif
if (GNUNET_YES == addr->active)
}
#if HAVE_LIBGLPK
if (ats_mode == MLP)
- GAS_mlp_address_update (addresses, old);
+ GAS_mlp_address_update (mlp, addresses, old);
#endif
}
/* session was set to 0, update address */
#if HAVE_LIBGLPK
if (ats_mode == MLP)
- GAS_mlp_address_update (addresses, aa);
+ GAS_mlp_address_update (mlp, addresses, aa);
#endif
}
#if HAVE_LIBGLPK
if (ats_mode == MLP)
- GAS_mlp_address_update (addresses, old);
+ GAS_mlp_address_update (mlp, addresses, old);
#endif
}
"WAN_QUOTA_OUT",
&wan_quota_out));
-
-
switch (GNUNET_CONFIGURATION_get_value_yesno (cfg, "ats", "MLP"))
{
/* MLP = YES */
#if HAVE_LIBGLPK
ats_mode = MLP;
/* Init the MLP solver with default values */
- GAS_mlp_init (stats, MLP_MAX_EXEC_DURATION, MLP_MAX_ITERATIONS);
+ mlp = GAS_mlp_init (cfg, stats, MLP_MAX_EXEC_DURATION, MLP_MAX_ITERATIONS);
break;
#else
+
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "MLP mode was configured, but libglpk is not installed, switching to simple mode");
ats_mode = SIMPLE;
break;
#if HAVE_LIBGLPK
if (ats_mode == MLP)
{
- GAS_mlp_done ();
+ GAS_mlp_done (mlp);
}
#endif