aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_quota_compliance.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/test_quota_compliance.c')
-rw-r--r--src/transport/test_quota_compliance.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/transport/test_quota_compliance.c b/src/transport/test_quota_compliance.c
index 250d3279f..d1e388506 100644
--- a/src/transport/test_quota_compliance.c
+++ b/src/transport/test_quota_compliance.c
@@ -415,7 +415,6 @@ static char *
415generate_config (char *cfg_file, unsigned long long quota_in, 415generate_config (char *cfg_file, unsigned long long quota_in,
416 unsigned long long quota_out) 416 unsigned long long quota_out)
417{ 417{
418 char *networks[GNUNET_ATS_NetworkTypeCount] = GNUNET_ATS_NetworkTypeString;
419 char *in_name; 418 char *in_name;
420 char *out_name; 419 char *out_name;
421 char *fname = NULL; 420 char *fname = NULL;
@@ -430,12 +429,16 @@ generate_config (char *cfg_file, unsigned long long quota_in,
430 429
431 for (c = 0; c < GNUNET_ATS_NetworkTypeCount; c++) 430 for (c = 0; c < GNUNET_ATS_NetworkTypeCount; c++)
432 { 431 {
433 GNUNET_asprintf (&in_name, "%s_QUOTA_IN", networks[c]); 432 GNUNET_asprintf (&in_name,
434 GNUNET_asprintf (&out_name, "%s_QUOTA_OUT", networks[c]); 433 "%s_QUOTA_IN",
435 GNUNET_CONFIGURATION_set_value_number (cfg, "ats", in_name, quota_in); 434 GNUNET_ATS_print_network_type (c));
436 GNUNET_CONFIGURATION_set_value_number (cfg, "ats", out_name, quota_out); 435 GNUNET_asprintf (&out_name,
437 GNUNET_free (in_name); 436 "%s_QUOTA_OUT",
438 GNUNET_free (out_name); 437 GNUNET_ATS_print_network_type (c));
438 GNUNET_CONFIGURATION_set_value_number (cfg, "ats", in_name, quota_in);
439 GNUNET_CONFIGURATION_set_value_number (cfg, "ats", out_name, quota_out);
440 GNUNET_free (in_name);
441 GNUNET_free (out_name);
439 } 442 }
440 GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_write (cfg, fname)); 443 GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_write (cfg, fname));
441 GNUNET_CONFIGURATION_destroy (cfg); 444 GNUNET_CONFIGURATION_destroy (cfg);