aboutsummaryrefslogtreecommitdiff
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,
274static unsigned long long 274static unsigned long long
275parse_quota (const char *quota_str, 275parse_quota (const char *quota_str,
276 const char *direction, 276 const char *direction,
277 enum GNUNET_ATS_Network_Type network) 277 enum GNUNET_NetworkType network)
278{ 278{
279 int res; 279 int res;
280 unsigned long long ret; 280 unsigned long long ret;
@@ -301,7 +301,7 @@ parse_quota (const char *quota_str,
301 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 301 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
302 _("Could not load %s quota for network `%s': `%s', assigning default bandwidth %llu\n"), 302 _("Could not load %s quota for network `%s': `%s', assigning default bandwidth %llu\n"),
303 direction, 303 direction,
304 GNUNET_ATS_print_network_type (network), 304 GNUNET_NT_to_string (network),
305 quota_str, 305 quota_str,
306 (unsigned long long) GNUNET_ATS_DefaultBandwidth); 306 (unsigned long long) GNUNET_ATS_DefaultBandwidth);
307 ret = GNUNET_ATS_DefaultBandwidth; 307 ret = GNUNET_ATS_DefaultBandwidth;
@@ -311,7 +311,7 @@ parse_quota (const char *quota_str,
311 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 311 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
312 _("%s quota configured for network `%s' is %llu\n"), 312 _("%s quota configured for network `%s' is %llu\n"),
313 direction, 313 direction,
314 GNUNET_ATS_print_network_type (network), 314 GNUNET_NT_to_string (network),
315 ret); 315 ret);
316 } 316 }
317 return ret; 317 return ret;
@@ -329,7 +329,7 @@ parse_quota (const char *quota_str,
329 */ 329 */
330static unsigned long long 330static unsigned long long
331load_quota (const struct GNUNET_CONFIGURATION_Handle *cfg, 331load_quota (const struct GNUNET_CONFIGURATION_Handle *cfg,
332 enum GNUNET_ATS_Network_Type type, 332 enum GNUNET_NetworkType type,
333 const char *direction) 333 const char *direction)
334{ 334{
335 char *entry; 335 char *entry;
@@ -338,7 +338,7 @@ load_quota (const struct GNUNET_CONFIGURATION_Handle *cfg,
338 338
339 GNUNET_asprintf (&entry, 339 GNUNET_asprintf (&entry,
340 "%s_QUOTA_%s", 340 "%s_QUOTA_%s",
341 GNUNET_ATS_print_network_type (type), 341 GNUNET_NT_to_string (type),
342 direction); 342 direction);
343 if (GNUNET_OK == 343 if (GNUNET_OK ==
344 GNUNET_CONFIGURATION_get_value_string (cfg, 344 GNUNET_CONFIGURATION_get_value_string (cfg,
@@ -356,7 +356,7 @@ load_quota (const struct GNUNET_CONFIGURATION_Handle *cfg,
356 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 356 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
357 _("No %s-quota configured for network `%s', assigning default bandwidth %llu\n"), 357 _("No %s-quota configured for network `%s', assigning default bandwidth %llu\n"),
358 direction, 358 direction,
359 GNUNET_ATS_print_network_type (type), 359 GNUNET_NT_to_string (type),
360 (unsigned long long) GNUNET_ATS_DefaultBandwidth); 360 (unsigned long long) GNUNET_ATS_DefaultBandwidth);
361 ret = GNUNET_ATS_DefaultBandwidth; 361 ret = GNUNET_ATS_DefaultBandwidth;
362 } 362 }
@@ -382,7 +382,7 @@ load_quotas (const struct GNUNET_CONFIGURATION_Handle *cfg,
382{ 382{
383 unsigned int c; 383 unsigned int c;
384 384
385 for (c = 0; (c < GNUNET_ATS_NetworkTypeCount) && (c < dest_length); c++) 385 for (c = 0; (c < GNUNET_NT_COUNT) && (c < dest_length); c++)
386 { 386 {
387 in_dest[c] = load_quota (cfg, 387 in_dest[c] = load_quota (cfg,
388 c, 388 c,
@@ -392,7 +392,7 @@ load_quotas (const struct GNUNET_CONFIGURATION_Handle *cfg,
392 "in"); 392 "in");
393 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 393 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
394 "Loaded quota for network `%s' (in/out): %llu %llu\n", 394 "Loaded quota for network `%s' (in/out): %llu %llu\n",
395 GNUNET_ATS_print_network_type (c), 395 GNUNET_NT_to_string (c),
396 in_dest[c], 396 in_dest[c],
397 out_dest[c]); 397 out_dest[c]);
398 } 398 }
@@ -431,11 +431,11 @@ GAS_plugin_init (const struct GNUNET_CONFIGURATION_Handle *cfg)
431 env.cfg = cfg; 431 env.cfg = cfg;
432 env.stats = GSA_stats; 432 env.stats = GSA_stats;
433 env.addresses = GSA_addresses; 433 env.addresses = GSA_addresses;
434 env.network_count = GNUNET_ATS_NetworkTypeCount; 434 env.network_count = GNUNET_NT_COUNT;
435 load_quotas (cfg, 435 load_quotas (cfg,
436 env.out_quota, 436 env.out_quota,
437 env.in_quota, 437 env.in_quota,
438 GNUNET_ATS_NetworkTypeCount); 438 GNUNET_NT_COUNT);
439 GNUNET_asprintf (&plugin, 439 GNUNET_asprintf (&plugin,
440 "libgnunet_plugin_ats_%s", 440 "libgnunet_plugin_ats_%s",
441 mode_str); 441 mode_str);