diff options
Diffstat (limited to 'src/ats')
-rw-r--r-- | src/ats/ats.conf | 4 | ||||
-rw-r--r-- | src/ats/ats_api.c | 4 | ||||
-rw-r--r-- | src/ats/gnunet-service-ats_addresses.c | 20 |
3 files changed, 14 insertions, 14 deletions
diff --git a/src/ats/ats.conf b/src/ats/ats.conf index f5d6c7765..d56227ff2 100644 --- a/src/ats/ats.conf +++ b/src/ats/ats.conf | |||
@@ -11,8 +11,8 @@ UNIXPATH = /tmp/gnunet-service-ats.sock | |||
11 | UNIX_MATCH_UID = YES | 11 | UNIX_MATCH_UID = YES |
12 | UNIX_MATCH_GID = YES | 12 | UNIX_MATCH_GID = YES |
13 | 13 | ||
14 | TOTAL_QUOTA_IN = 65536 | 14 | WAN_QUOTA_IN = 65536 |
15 | TOTAL_QUOTA_OUT = 65536 | 15 | WAN_QUOTA_OUT = 65536 |
16 | # ATS options | 16 | # ATS options |
17 | DUMP_MLP = NO | 17 | DUMP_MLP = NO |
18 | DUMP_SOLUTION = NO | 18 | DUMP_SOLUTION = NO |
diff --git a/src/ats/ats_api.c b/src/ats/ats_api.c index 8ebc240e1..47daad6cf 100644 --- a/src/ats/ats_api.c +++ b/src/ats/ats_api.c | |||
@@ -341,9 +341,9 @@ GNUNET_ATS_init (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
341 | atc->alloc_cb_cls = alloc_cb_cls; | 341 | atc->alloc_cb_cls = alloc_cb_cls; |
342 | atc->peers = GNUNET_CONTAINER_multihashmap_create (256); | 342 | atc->peers = GNUNET_CONTAINER_multihashmap_create (256); |
343 | atc->notify_map = GNUNET_CONTAINER_multihashmap_create (256); | 343 | atc->notify_map = GNUNET_CONTAINER_multihashmap_create (256); |
344 | GNUNET_CONFIGURATION_get_value_size (cfg, "core", "TOTAL_QUOTA_OUT", | 344 | GNUNET_CONFIGURATION_get_value_size (cfg, "ats", "WAN_QUOTA_OUT", |
345 | &atc->total_bps_out); | 345 | &atc->total_bps_out); |
346 | GNUNET_CONFIGURATION_get_value_size (cfg, "core", "TOTAL_QUOTA_IN", | 346 | GNUNET_CONFIGURATION_get_value_size (cfg, "ats", "WAN_QUOTA_IN", |
347 | &atc->total_bps_in); | 347 | &atc->total_bps_in); |
348 | return atc; | 348 | return atc; |
349 | } | 349 | } |
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 | ||
77 | static struct GNUNET_CONTAINER_MultiHashMap *addresses; | 77 | static struct GNUNET_CONTAINER_MultiHashMap *addresses; |
78 | 78 | ||
79 | static unsigned long long total_quota_in; | 79 | static unsigned long long wan_quota_in; |
80 | 80 | ||
81 | static unsigned long long total_quota_out; | 81 | static unsigned long long wan_quota_out; |
82 | 82 | ||
83 | static unsigned int active_addr_count; | 83 | static 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 | |||
475 | GAS_addresses_init (const struct GNUNET_CONFIGURATION_Handle *cfg) | 475 | GAS_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 | ||