aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-02-08 19:43:46 +0000
committerChristian Grothoff <christian@grothoff.org>2015-02-08 19:43:46 +0000
commit5d24ff73a2c57b94e8578d327d91e869dcae2c32 (patch)
tree70449c6230afdb56e3720f224a78b4f5a38b1b13 /src
parenteb35d815d2008d7744d0c5bf87e769a014d175dd (diff)
downloadgnunet-5d24ff73a2c57b94e8578d327d91e869dcae2c32.tar.gz
gnunet-5d24ff73a2c57b94e8578d327d91e869dcae2c32.zip
-simplify flow
Diffstat (limited to 'src')
-rw-r--r--src/ats/plugin_ats_proportional.c39
1 files changed, 19 insertions, 20 deletions
diff --git a/src/ats/plugin_ats_proportional.c b/src/ats/plugin_ats_proportional.c
index ad026c619..f7d68e629 100644
--- a/src/ats/plugin_ats_proportional.c
+++ b/src/ats/plugin_ats_proportional.c
@@ -1127,26 +1127,25 @@ GAS_proportional_stop_get_preferred_address (void *solver,
1127 1127
1128 cur = get_active_address (s, 1128 cur = get_active_address (s,
1129 peer); 1129 peer);
1130 if (NULL != cur) 1130 if (NULL == cur)
1131 { 1131 return;
1132 LOG (GNUNET_ERROR_TYPE_INFO, 1132 LOG (GNUNET_ERROR_TYPE_INFO,
1133 "Disabling %s address %p for peer `%s'\n", 1133 "Disabling %s address %p for peer `%s'\n",
1134 (GNUNET_NO == cur->active) ? "inactive" : "active", 1134 (GNUNET_NO == cur->active) ? "inactive" : "active",
1135 cur, 1135 cur,
1136 GNUNET_i2s (&cur->peer)); 1136 GNUNET_i2s (&cur->peer));
1137 1137
1138 /* Disabling current address */ 1138 /* Disabling current address */
1139 asi = cur->solver_information; 1139 asi = cur->solver_information;
1140 cur_net = asi->network; 1140 cur_net = asi->network;
1141 asi->activated = GNUNET_TIME_UNIT_ZERO_ABS; 1141 asi->activated = GNUNET_TIME_UNIT_ZERO_ABS;
1142 cur->active = GNUNET_NO; /* No active any longer */ 1142 cur->active = GNUNET_NO; /* No active any longer */
1143 cur->assigned_bw_in = 0; /* no bandwidth assigned */ 1143 cur->assigned_bw_in = 0; /* no bandwidth assigned */
1144 cur->assigned_bw_out = 0; /* no bandwidth assigned */ 1144 cur->assigned_bw_out = 0; /* no bandwidth assigned */
1145 1145 address_decrement_active (s,
1146 address_decrement_active (s, cur_net); 1146 cur_net);
1147 1147 distribute_bandwidth_in_network (s,
1148 distribute_bandwidth_in_network (s, cur_net); 1148 cur_net);
1149 }
1150} 1149}
1151 1150
1152 1151