diff options
Diffstat (limited to 'src/ats/perf_ats_solver.c')
-rw-r--r-- | src/ats/perf_ats_solver.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/ats/perf_ats_solver.c b/src/ats/perf_ats_solver.c index c2885bbef..73871c053 100644 --- a/src/ats/perf_ats_solver.c +++ b/src/ats/perf_ats_solver.c | |||
@@ -1111,11 +1111,11 @@ perf_run_iteration (void) | |||
1111 | /* Add address */ | 1111 | /* Add address */ |
1112 | 1112 | ||
1113 | /* Random network selection */ | 1113 | /* Random network selection */ |
1114 | //net = 1 + GNUNET_CRYPTO_random_u32(GNUNET_CRYPTO_QUALITY_WEAK, GNUNET_ATS_NetworkTypeCount - 1); | 1114 | //net = 1 + GNUNET_CRYPTO_random_u32(GNUNET_CRYPTO_QUALITY_WEAK, GNUNET_NT_COUNT - 1); |
1115 | /* Random equally distributed network selection */ | 1115 | /* Random equally distributed network selection */ |
1116 | net = 1 + (ca % (GNUNET_ATS_NetworkTypeCount - 1)); | 1116 | net = 1 + (ca % (GNUNET_NT_COUNT - 1)); |
1117 | /* fprintf (stderr, "Network: %u `%s'\n", | 1117 | /* fprintf (stderr, "Network: %u `%s'\n", |
1118 | * mod_net , GNUNET_ATS_print_network_type(mod_net)); */ | 1118 | * mod_net , GNUNET_NT_to_string(mod_net)); */ |
1119 | 1119 | ||
1120 | cur_addr->atsi = GNUNET_new (struct GNUNET_ATS_Information); | 1120 | cur_addr->atsi = GNUNET_new (struct GNUNET_ATS_Information); |
1121 | cur_addr->atsi_count = 1; | 1121 | cur_addr->atsi_count = 1; |
@@ -1127,7 +1127,7 @@ perf_run_iteration (void) | |||
1127 | perf_address_initial_update (NULL, ph.addresses, cur_addr); | 1127 | perf_address_initial_update (NULL, ph.addresses, cur_addr); |
1128 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, | 1128 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, |
1129 | "Adding address for peer %u address %u in network %s\n", cp, ca, | 1129 | "Adding address for peer %u address %u in network %s\n", cp, ca, |
1130 | GNUNET_ATS_print_network_type(net)); | 1130 | GNUNET_NT_to_string(net)); |
1131 | } | 1131 | } |
1132 | /* Notify solver about request */ | 1132 | /* Notify solver about request */ |
1133 | ph.sf->s_get (ph.sf->cls, &ph.peers[cp].id); | 1133 | ph.sf->s_get (ph.sf->cls, &ph.peers[cp].id); |
@@ -1210,8 +1210,8 @@ run (void *cls, char * const *args, const char *cfgfile, | |||
1210 | char *solver; | 1210 | char *solver; |
1211 | char *plugin; | 1211 | char *plugin; |
1212 | struct GNUNET_CONFIGURATION_Handle *solver_cfg; | 1212 | struct GNUNET_CONFIGURATION_Handle *solver_cfg; |
1213 | unsigned long long quotas_in[GNUNET_ATS_NetworkTypeCount]; | 1213 | unsigned long long quotas_in[GNUNET_NT_COUNT]; |
1214 | unsigned long long quotas_out[GNUNET_ATS_NetworkTypeCount]; | 1214 | unsigned long long quotas_out[GNUNET_NT_COUNT]; |
1215 | int c; | 1215 | int c; |
1216 | int c2; | 1216 | int c2; |
1217 | 1217 | ||
@@ -1286,8 +1286,8 @@ run (void *cls, char * const *args, const char *cfgfile, | |||
1286 | end_now (1); | 1286 | end_now (1); |
1287 | return; | 1287 | return; |
1288 | } | 1288 | } |
1289 | if (GNUNET_ATS_NetworkTypeCount != load_quotas (solver_cfg, | 1289 | if (GNUNET_NT_COUNT != load_quotas (solver_cfg, |
1290 | quotas_out, quotas_in, GNUNET_ATS_NetworkTypeCount)) | 1290 | quotas_out, quotas_in, GNUNET_NT_COUNT)) |
1291 | { | 1291 | { |
1292 | GNUNET_break(0); | 1292 | GNUNET_break(0); |
1293 | end_now (1); | 1293 | end_now (1); |
@@ -1306,16 +1306,16 @@ run (void *cls, char * const *args, const char *cfgfile, | |||
1306 | ph.env.bandwidth_changed_cb = bandwidth_changed_cb; | 1306 | ph.env.bandwidth_changed_cb = bandwidth_changed_cb; |
1307 | ph.env.get_connectivity = &get_connectivity_cb; | 1307 | ph.env.get_connectivity = &get_connectivity_cb; |
1308 | ph.env.get_preferences = &get_preferences_cb; | 1308 | ph.env.get_preferences = &get_preferences_cb; |
1309 | ph.env.network_count = GNUNET_ATS_NetworkTypeCount; | 1309 | ph.env.network_count = GNUNET_NT_COUNT; |
1310 | ph.env.info_cb = &solver_info_cb; | 1310 | ph.env.info_cb = &solver_info_cb; |
1311 | 1311 | ||
1312 | for (c = 0; c < GNUNET_ATS_NetworkTypeCount; c++) | 1312 | for (c = 0; c < GNUNET_NT_COUNT; c++) |
1313 | { | 1313 | { |
1314 | ph.env.out_quota[c] = quotas_out[c]; | 1314 | ph.env.out_quota[c] = quotas_out[c]; |
1315 | ph.env.in_quota[c] = quotas_in[c]; | 1315 | ph.env.in_quota[c] = quotas_in[c]; |
1316 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 1316 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
1317 | "Loading network quotas: `%s' %llu %llu \n", | 1317 | "Loading network quotas: `%s' %llu %llu \n", |
1318 | GNUNET_ATS_print_network_type (c), | 1318 | GNUNET_NT_to_string (c), |
1319 | ph.env.out_quota[c], | 1319 | ph.env.out_quota[c], |
1320 | ph.env.in_quota[c]); | 1320 | ph.env.in_quota[c]); |
1321 | } | 1321 | } |