/*
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
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
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;
}
update_active_address (s,
aw_min->addr,
- &aw->addr->peer);
+ &aw_min->addr->peer);
}
distribute_bandwidth_in_network (s,
asi_best->network);