projects
/
oweals
/
gnunet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use NULL as flag for evaluation of query, ensure we pass non-NULL for reply_block...
[oweals/gnunet.git]
/
src
/
ats
/
plugin_ats_proportional.c
diff --git
a/src/ats/plugin_ats_proportional.c
b/src/ats/plugin_ats_proportional.c
index 9ad00bbb36a57bc99744ad26b3db19ac0c8a55f0..9309bc2ea799df575b99b5884aea081cd2ab8552 100644
(file)
--- a/
src/ats/plugin_ats_proportional.c
+++ b/
src/ats/plugin_ats_proportional.c
@@
-1,6
+1,6
@@
/*
This file is part of GNUnet.
/*
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
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
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., 5
9 Temple Place - Suite 330
,
- Boston, MA 0211
1-1307
, USA.
+ Free Software Foundation, Inc., 5
1 Franklin Street, Fifth Floor
,
+ Boston, MA 0211
0-1301
, USA.
*/
/**
* @file ats/plugin_ats_proportional.c
*/
/**
* @file ats/plugin_ats_proportional.c
@@
-215,7
+215,7
@@
is_bandwidth_available_in_network (struct Network *net,
unsigned int na;
uint32_t min_bw = ntohl (GNUNET_CONSTANTS_DEFAULT_BW_IN_OUT.value__);
unsigned int na;
uint32_t min_bw = ntohl (GNUNET_CONSTANTS_DEFAULT_BW_IN_OUT.value__);
- GNUNET_assert (
net->active_addresses
+ extra >= 0);
+ GNUNET_assert (
((int)net->active_addresses)
+ extra >= 0);
na = net->active_addresses + extra;
if (0 == na)
return GNUNET_YES;
na = net->active_addresses + extra;
if (0 == na)
return GNUNET_YES;
@@
-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)
{
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;
{
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,
}
update_active_address (s,
aw_min->addr,
- &aw->addr->peer);
+ &aw
_min
->addr->peer);
}
distribute_bandwidth_in_network (s,
asi_best->network);
}
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,
*/
static void
GAS_proportional_feedback (void *solver,
- struct GNUNET_SERV
ER
_Client *application,
+ struct GNUNET_SERV
ICE
_Client *application,
const struct GNUNET_PeerIdentity *peer,
const struct GNUNET_TIME_Relative scope,
enum GNUNET_ATS_PreferenceKind kind,
const struct GNUNET_PeerIdentity *peer,
const struct GNUNET_TIME_Relative scope,
enum GNUNET_ATS_PreferenceKind kind,