From: Matthias Wachs Date: Tue, 12 Apr 2011 13:55:26 +0000 (+0000) Subject: (no commit message) X-Git-Tag: initial-import-from-subversion-38251~18704 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a44571c19eb4989737491601e5656145a8c69b0f;p=oweals%2Fgnunet.git --- diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 004ff02f3..e9d84127b 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c @@ -5877,9 +5877,10 @@ return cont; static void ats_solve_problem (unsigned int max_it, unsigned int max_dur, unsigned int c_peers, unsigned int c_mechs, struct ATS_result *res) { +#if HAVE_LIBGLPK int result; int solution; -#if HAVE_LIBGLPK + // Solving simplex glp_prob *prob = ats->prob; /* @@ -6458,6 +6459,8 @@ void ats_calculate_bandwidth_distribution () else dur = (int) ats->max_exec_duration.rel_value; +#if HAVE_LIBGLPK + start = GNUNET_TIME_absolute_get(); if ((ats->modified_addr == GNUNET_YES) || (ats->prob==NULL)) { @@ -6514,6 +6517,8 @@ void ats_calculate_bandwidth_distribution () ats->modified_addr = GNUNET_NO; ats->modified_resources = GNUNET_NO; ats->modified_quality = GNUNET_NO; + +#endif } @@ -6612,13 +6617,13 @@ void ats_shutdown () if (ats->ats_task != GNUNET_SCHEDULER_NO_TASK) GNUNET_SCHEDULER_cancel(ats->ats_task); ats->ats_task = GNUNET_SCHEDULER_NO_TASK; - +#if HAVE_LIBGLPK if (ats->prob != NULL) { glp_delete_prob(ats->prob); ats->prob = NULL; } - +#endif GNUNET_free (ats); }