diff options
author | Fabian Oehlmann <oehlmann@in.tum.de> | 2014-01-29 19:45:49 +0000 |
---|---|---|
committer | Fabian Oehlmann <oehlmann@in.tum.de> | 2014-01-29 19:45:49 +0000 |
commit | 9a4b2cc1f44733ba28f153ac30bafd588037cca4 (patch) | |
tree | 1043b467ffa8672ae8c1c2e2aeee383219f89c03 /src | |
parent | 83962507ef90d6ce1b9a883fff2e57a9e182ee9d (diff) | |
download | gnunet-9a4b2cc1f44733ba28f153ac30bafd588037cca4.tar.gz gnunet-9a4b2cc1f44733ba28f153ac30bafd588037cca4.zip |
-revert of address_bw addition
Diffstat (limited to 'src')
-rwxr-xr-x | src/ats/plugin_ats_ril.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/src/ats/plugin_ats_ril.c b/src/ats/plugin_ats_ril.c index 26d7b0c3a..2177c91ac 100755 --- a/src/ats/plugin_ats_ril.c +++ b/src/ats/plugin_ats_ril.c | |||
@@ -199,17 +199,6 @@ struct RIL_Address_Wrapped | |||
199 | * The address | 199 | * The address |
200 | */ | 200 | */ |
201 | struct ATS_Address *address_naked; | 201 | struct ATS_Address *address_naked; |
202 | |||
203 | /** | ||
204 | * Last inbound bandwidth used | ||
205 | */ | ||
206 | unsigned long long bw_in; | ||
207 | |||
208 | /** | ||
209 | * Last outbound bandwidth used | ||
210 | */ | ||
211 | unsigned long long bw_out; | ||
212 | |||
213 | }; | 202 | }; |
214 | 203 | ||
215 | struct RIL_Peer_Agent | 204 | struct RIL_Peer_Agent |
@@ -1228,14 +1217,12 @@ envi_action_address_switch (struct GAS_RIL_Handle *solver, | |||
1228 | int i = 0; | 1217 | int i = 0; |
1229 | 1218 | ||
1230 | cur = agent_address_get_wrapped(agent, agent->address_inuse); | 1219 | cur = agent_address_get_wrapped(agent, agent->address_inuse); |
1231 | cur->bw_in = agent->bw_in; | ||
1232 | cur->bw_out = agent->bw_out; | ||
1233 | 1220 | ||
1234 | for (cur = agent->addresses_head; NULL != cur; cur = cur->next) | 1221 | for (cur = agent->addresses_head; NULL != cur; cur = cur->next) |
1235 | { | 1222 | { |
1236 | if (i == address_index) | 1223 | if (i == address_index) |
1237 | { | 1224 | { |
1238 | envi_set_active_suggestion (solver, agent, cur->address_naked, cur->bw_in, cur->bw_out, | 1225 | envi_set_active_suggestion (solver, agent, cur->address_naked, agent->bw_in, agent->bw_out, |
1239 | GNUNET_NO); | 1226 | GNUNET_NO); |
1240 | return; | 1227 | return; |
1241 | } | 1228 | } |
@@ -1636,7 +1623,7 @@ ril_try_unblock_agent (struct GAS_RIL_Handle *solver, struct RIL_Peer_Agent *age | |||
1636 | if (ril_network_is_not_full(solver, net->type)) | 1623 | if (ril_network_is_not_full(solver, net->type)) |
1637 | { | 1624 | { |
1638 | if (NULL == agent->address_inuse) | 1625 | if (NULL == agent->address_inuse) |
1639 | envi_set_active_suggestion (solver, agent, addr_wrap->address_naked, addr_wrap->bw_in, addr_wrap->bw_out, silent); | 1626 | envi_set_active_suggestion (solver, agent, addr_wrap->address_naked, agent->bw_in, agent->bw_out, silent); |
1640 | return; | 1627 | return; |
1641 | } | 1628 | } |
1642 | } | 1629 | } |
@@ -2414,8 +2401,6 @@ GAS_ril_address_add (void *solver, struct ATS_Address *address, uint32_t network | |||
2414 | //add address | 2401 | //add address |
2415 | address_wrapped = GNUNET_new (struct RIL_Address_Wrapped); | 2402 | address_wrapped = GNUNET_new (struct RIL_Address_Wrapped); |
2416 | address_wrapped->address_naked = address; | 2403 | address_wrapped->address_naked = address; |
2417 | address_wrapped->bw_in = net->bw_in_available > net->bw_in_utilized ? (net->bw_in_available - net->bw_in_utilized) / 2 : RIL_MIN_BW; | ||
2418 | address_wrapped->bw_out = net->bw_out_available > net->bw_out_utilized ? (net->bw_out_available - net->bw_out_utilized) / 2 : RIL_MIN_BW; | ||
2419 | GNUNET_CONTAINER_DLL_insert_tail(agent->addresses_head, agent->addresses_tail, address_wrapped); | 2404 | GNUNET_CONTAINER_DLL_insert_tail(agent->addresses_head, agent->addresses_tail, address_wrapped); |
2420 | 2405 | ||
2421 | //increase size of W | 2406 | //increase size of W |
@@ -2547,7 +2532,7 @@ GAS_ril_address_delete (void *solver, struct ATS_Address *address, int session_o | |||
2547 | { | 2532 | { |
2548 | if (NULL != agent->addresses_head) //if peer has an address left, use it | 2533 | if (NULL != agent->addresses_head) //if peer has an address left, use it |
2549 | { | 2534 | { |
2550 | envi_set_active_suggestion (s, agent, agent->addresses_head->address_naked, agent->addresses_head->bw_in, agent->addresses_head->bw_out, | 2535 | envi_set_active_suggestion (s, agent, agent->addresses_head->address_naked, agent->bw_in, agent->bw_out, |
2551 | GNUNET_YES); | 2536 | GNUNET_YES); |
2552 | } | 2537 | } |
2553 | else | 2538 | else |