summaryrefslogtreecommitdiff
path: root/src/ats/gnunet-service-ats_plugins.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ats/gnunet-service-ats_plugins.c')
-rw-r--r--src/ats/gnunet-service-ats_plugins.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/ats/gnunet-service-ats_plugins.c b/src/ats/gnunet-service-ats_plugins.c
index 4b998b982..1ca39ff15 100644
--- a/src/ats/gnunet-service-ats_plugins.c
+++ b/src/ats/gnunet-service-ats_plugins.c
@@ -274,7 +274,7 @@ bandwidth_changed_cb (void *cls,
static unsigned long long
parse_quota (const char *quota_str,
const char *direction,
- enum GNUNET_ATS_Network_Type network)
+ enum GNUNET_NetworkType network)
{
int res;
unsigned long long ret;
@@ -301,7 +301,7 @@ parse_quota (const char *quota_str,
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("Could not load %s quota for network `%s': `%s', assigning default bandwidth %llu\n"),
direction,
- GNUNET_ATS_print_network_type (network),
+ GNUNET_NT_to_string (network),
quota_str,
(unsigned long long) GNUNET_ATS_DefaultBandwidth);
ret = GNUNET_ATS_DefaultBandwidth;
@@ -311,7 +311,7 @@ parse_quota (const char *quota_str,
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
_("%s quota configured for network `%s' is %llu\n"),
direction,
- GNUNET_ATS_print_network_type (network),
+ GNUNET_NT_to_string (network),
ret);
}
return ret;
@@ -329,7 +329,7 @@ parse_quota (const char *quota_str,
*/
static unsigned long long
load_quota (const struct GNUNET_CONFIGURATION_Handle *cfg,
- enum GNUNET_ATS_Network_Type type,
+ enum GNUNET_NetworkType type,
const char *direction)
{
char *entry;
@@ -338,7 +338,7 @@ load_quota (const struct GNUNET_CONFIGURATION_Handle *cfg,
GNUNET_asprintf (&entry,
"%s_QUOTA_%s",
- GNUNET_ATS_print_network_type (type),
+ GNUNET_NT_to_string (type),
direction);
if (GNUNET_OK ==
GNUNET_CONFIGURATION_get_value_string (cfg,
@@ -356,7 +356,7 @@ load_quota (const struct GNUNET_CONFIGURATION_Handle *cfg,
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("No %s-quota configured for network `%s', assigning default bandwidth %llu\n"),
direction,
- GNUNET_ATS_print_network_type (type),
+ GNUNET_NT_to_string (type),
(unsigned long long) GNUNET_ATS_DefaultBandwidth);
ret = GNUNET_ATS_DefaultBandwidth;
}
@@ -382,7 +382,7 @@ load_quotas (const struct GNUNET_CONFIGURATION_Handle *cfg,
{
unsigned int c;
- for (c = 0; (c < GNUNET_ATS_NetworkTypeCount) && (c < dest_length); c++)
+ for (c = 0; (c < GNUNET_NT_COUNT) && (c < dest_length); c++)
{
in_dest[c] = load_quota (cfg,
c,
@@ -392,7 +392,7 @@ load_quotas (const struct GNUNET_CONFIGURATION_Handle *cfg,
"in");
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Loaded quota for network `%s' (in/out): %llu %llu\n",
- GNUNET_ATS_print_network_type (c),
+ GNUNET_NT_to_string (c),
in_dest[c],
out_dest[c]);
}
@@ -431,11 +431,11 @@ GAS_plugin_init (const struct GNUNET_CONFIGURATION_Handle *cfg)
env.cfg = cfg;
env.stats = GSA_stats;
env.addresses = GSA_addresses;
- env.network_count = GNUNET_ATS_NetworkTypeCount;
+ env.network_count = GNUNET_NT_COUNT;
load_quotas (cfg,
env.out_quota,
env.in_quota,
- GNUNET_ATS_NetworkTypeCount);
+ GNUNET_NT_COUNT);
GNUNET_asprintf (&plugin,
"libgnunet_plugin_ats_%s",
mode_str);