X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fats%2Fplugin_ats_proportional.c;h=9309bc2ea799df575b99b5884aea081cd2ab8552;hb=7c8c596991f6397ec3ca1911638acb2de721c7a7;hp=7dae3c8bedcc7f3acaea317253abb25c4a8f88a0;hpb=3e693f3ceb1b3425b17900423628aecb609f2433;p=oweals%2Fgnunet.git diff --git a/src/ats/plugin_ats_proportional.c b/src/ats/plugin_ats_proportional.c index 7dae3c8be..9309bc2ea 100644 --- a/src/ats/plugin_ats_proportional.c +++ b/src/ats/plugin_ats_proportional.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - Copyright (C) 2011-2015 Christian Grothoff (and other contributing authors) + Copyright (C) 2011-2015 GNUnet e.V. GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -14,8 +14,8 @@ You should have received a copy of the GNU General Public License along with GNUnet; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ /** * @file ats/plugin_ats_proportional.c @@ -824,9 +824,10 @@ update_active_address (struct GAS_PROPORTIONAL_Handle *s, aw_min = NULL; for (aw = asi_best->network->head; NULL != aw; aw = aw->next) { - if (con_min > - (a_con = s->env->get_connectivity (s->env->cls, - &aw->addr->peer))) + if ( (con_min > + (a_con = s->env->get_connectivity (s->env->cls, + &aw->addr->peer))) && + (GNUNET_YES == aw->addr->active) ) { aw_min = aw; con_min = a_con; @@ -836,7 +837,7 @@ update_active_address (struct GAS_PROPORTIONAL_Handle *s, } update_active_address (s, aw_min->addr, - &aw->addr->peer); + &aw_min->addr->peer); } distribute_bandwidth_in_network (s, asi_best->network); @@ -878,7 +879,7 @@ GAS_proportional_change_preference (void *solver, */ static void GAS_proportional_feedback (void *solver, - struct GNUNET_SERVER_Client *application, + struct GNUNET_SERVICE_Client *application, const struct GNUNET_PeerIdentity *peer, const struct GNUNET_TIME_Relative scope, enum GNUNET_ATS_PreferenceKind kind,