aboutsummaryrefslogtreecommitdiff
path: root/src/ats/gnunet-service-ats_addresses.c
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2011-11-29 17:13:57 +0000
committerBart Polot <bart@net.in.tum.de>2011-11-29 17:13:57 +0000
commit5ca85864950a1fe92613f5ed3a69cd08d248423e (patch)
tree26b44bbe805223a9ca58aa46d112bb49fad35f72 /src/ats/gnunet-service-ats_addresses.c
parentb312a0e714d1782f1258b3aaa697f8f36315cd60 (diff)
downloadgnunet-5ca85864950a1fe92613f5ed3a69cd08d248423e.tar.gz
gnunet-5ca85864950a1fe92613f5ed3a69cd08d248423e.zip
Changed quota configuration from core to ats section, renamed from TOTAL_QUOTA_* to WAN_QUOTA_*
Diffstat (limited to 'src/ats/gnunet-service-ats_addresses.c')
-rw-r--r--src/ats/gnunet-service-ats_addresses.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/ats/gnunet-service-ats_addresses.c b/src/ats/gnunet-service-ats_addresses.c
index 626ffbf61..04eacbbb1 100644
--- a/src/ats/gnunet-service-ats_addresses.c
+++ b/src/ats/gnunet-service-ats_addresses.c
@@ -76,9 +76,9 @@ struct ATS_Address
76 76
77static struct GNUNET_CONTAINER_MultiHashMap *addresses; 77static struct GNUNET_CONTAINER_MultiHashMap *addresses;
78 78
79static unsigned long long total_quota_in; 79static unsigned long long wan_quota_in;
80 80
81static unsigned long long total_quota_out; 81static unsigned long long wan_quota_out;
82 82
83static unsigned int active_addr_count; 83static unsigned int active_addr_count;
84 84
@@ -100,8 +100,8 @@ update_bw_it (void *cls, const GNUNET_HashCode * key, void *value)
100 if (GNUNET_YES != aa->active) 100 if (GNUNET_YES != aa->active)
101 return GNUNET_OK; 101 return GNUNET_OK;
102 GNUNET_assert (active_addr_count > 0); 102 GNUNET_assert (active_addr_count > 0);
103 aa->assigned_bw_in.value__ = htonl (total_quota_in / active_addr_count); 103 aa->assigned_bw_in.value__ = htonl (wan_quota_in / active_addr_count);
104 aa->assigned_bw_out.value__ = htonl (total_quota_out / active_addr_count); 104 aa->assigned_bw_out.value__ = htonl (wan_quota_out / active_addr_count);
105 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "New bandwidth for peer %s is %u/%u\n", 105 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "New bandwidth for peer %s is %u/%u\n",
106 GNUNET_i2s (&aa->peer), ntohl (aa->assigned_bw_in.value__), 106 GNUNET_i2s (&aa->peer), ntohl (aa->assigned_bw_in.value__),
107 ntohl (aa->assigned_bw_out.value__)); 107 ntohl (aa->assigned_bw_out.value__));
@@ -475,13 +475,13 @@ void
475GAS_addresses_init (const struct GNUNET_CONFIGURATION_Handle *cfg) 475GAS_addresses_init (const struct GNUNET_CONFIGURATION_Handle *cfg)
476{ 476{
477 GNUNET_assert (GNUNET_OK == 477 GNUNET_assert (GNUNET_OK ==
478 GNUNET_CONFIGURATION_get_value_size (cfg, "core", 478 GNUNET_CONFIGURATION_get_value_size (cfg, "ats",
479 "TOTAL_QUOTA_IN", 479 "WAN_QUOTA_IN",
480 &total_quota_in)); 480 &wan_quota_in));
481 GNUNET_assert (GNUNET_OK == 481 GNUNET_assert (GNUNET_OK ==
482 GNUNET_CONFIGURATION_get_value_size (cfg, "core", 482 GNUNET_CONFIGURATION_get_value_size (cfg, "ats",
483 "TOTAL_QUOTA_OUT", 483 "WAN_QUOTA_OUT",
484 &total_quota_out)); 484 &wan_quota_out));
485 addresses = GNUNET_CONTAINER_multihashmap_create (128); 485 addresses = GNUNET_CONTAINER_multihashmap_create (128);
486} 486}
487 487