diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-07-06 11:14:11 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-07-06 11:14:11 +0000 |
commit | f5beb3eaf163fc0bf2a4f86bd413d3ee6939cfea (patch) | |
tree | b59a38ad9e2296b3d2c8cc3302f21cf6d3ecc458 /src/ats-tests | |
parent | 6db64c5eae089e1d81cafbb051f65412790d16bc (diff) | |
download | gnunet-f5beb3eaf163fc0bf2a4f86bd413d3ee6939cfea.tar.gz gnunet-f5beb3eaf163fc0bf2a4f86bd413d3ee6939cfea.zip |
-fix misc issues
Diffstat (limited to 'src/ats-tests')
-rw-r--r-- | src/ats-tests/ats-testing-log.c | 2 | ||||
-rw-r--r-- | src/ats-tests/gnunet-solver-eval.c | 32 |
2 files changed, 24 insertions, 10 deletions
diff --git a/src/ats-tests/ats-testing-log.c b/src/ats-tests/ats-testing-log.c index 2442a8249..61aca6b18 100644 --- a/src/ats-tests/ats-testing-log.c +++ b/src/ats-tests/ats-testing-log.c | |||
@@ -686,7 +686,7 @@ GNUNET_ATS_TEST_logging_now (struct LoggingHandle *l) | |||
686 | } | 686 | } |
687 | else | 687 | else |
688 | { | 688 | { |
689 | mlt->total_throughput_send = 0; | 689 | mlt->total_throughput_recv = 0; |
690 | //mlt->total_throughput_recv = prev_log_mlt->total_throughput_recv; /* no msgs received */ | 690 | //mlt->total_throughput_recv = prev_log_mlt->total_throughput_recv; /* no msgs received */ |
691 | } | 691 | } |
692 | } | 692 | } |
diff --git a/src/ats-tests/gnunet-solver-eval.c b/src/ats-tests/gnunet-solver-eval.c index 0d2460b7f..0e49a3a32 100644 --- a/src/ats-tests/gnunet-solver-eval.c +++ b/src/ats-tests/gnunet-solver-eval.c | |||
@@ -65,6 +65,7 @@ create_experiment () | |||
65 | return e; | 65 | return e; |
66 | } | 66 | } |
67 | 67 | ||
68 | |||
68 | static void | 69 | static void |
69 | free_experiment (struct Experiment *e) | 70 | free_experiment (struct Experiment *e) |
70 | { | 71 | { |
@@ -92,9 +93,11 @@ free_experiment (struct Experiment *e) | |||
92 | GNUNET_free (e); | 93 | GNUNET_free (e); |
93 | } | 94 | } |
94 | 95 | ||
96 | |||
95 | static int | 97 | static int |
96 | load_episode (struct Experiment *e, struct Episode *cur, | 98 | load_episode (struct Experiment *e, |
97 | struct GNUNET_CONFIGURATION_Handle *cfg) | 99 | struct Episode *cur, |
100 | struct GNUNET_CONFIGURATION_Handle *cfg) | ||
98 | { | 101 | { |
99 | struct GNUNET_ATS_TEST_Operation *o; | 102 | struct GNUNET_ATS_TEST_Operation *o; |
100 | char *sec_name; | 103 | char *sec_name; |
@@ -186,8 +189,12 @@ load_episode (struct Experiment *e, struct Episode *cur, | |||
186 | } | 189 | } |
187 | if (o->dest_id > (e->num_slaves - 1)) | 190 | if (o->dest_id > (e->num_slaves - 1)) |
188 | { | 191 | { |
189 | fprintf (stderr, "Invalid destination %llu in operation %u `%s' in episode %u\n", | 192 | fprintf (stderr, |
190 | o->dest_id, op_counter, op, cur->id); | 193 | "Invalid destination %llu in operation %u `%s' in episode %u\n", |
194 | o->dest_id, | ||
195 | op_counter, | ||
196 | op, | ||
197 | cur->id); | ||
191 | GNUNET_free (op); | 198 | GNUNET_free (op); |
192 | GNUNET_free (op_name); | 199 | GNUNET_free (op_name); |
193 | GNUNET_free (sec_name); | 200 | GNUNET_free (sec_name); |
@@ -197,9 +204,13 @@ load_episode (struct Experiment *e, struct Episode *cur, | |||
197 | GNUNET_free (op_name); | 204 | GNUNET_free (op_name); |
198 | 205 | ||
199 | GNUNET_asprintf(&op_name, "op-%u-type", op_counter); | 206 | GNUNET_asprintf(&op_name, "op-%u-type", op_counter); |
200 | if ( (GNUNET_SYSERR != GNUNET_CONFIGURATION_get_value_string(cfg, | 207 | if ( (GNUNET_SYSERR != |
201 | sec_name, op_name, &type)) && | 208 | GNUNET_CONFIGURATION_get_value_string(cfg, |
202 | ((STOP_SEND != o->type) || (STOP_PREFERENCE != o->type))) | 209 | sec_name, |
210 | op_name, | ||
211 | &type)) && | ||
212 | (STOP_SEND != o->type) && | ||
213 | (STOP_PREFERENCE != o->type) ) | ||
203 | { | 214 | { |
204 | /* Load arguments for set_rate, start_send, set_preference */ | 215 | /* Load arguments for set_rate, start_send, set_preference */ |
205 | if (0 == strcmp (type, "constant")) | 216 | if (0 == strcmp (type, "constant")) |
@@ -249,8 +260,11 @@ load_episode (struct Experiment *e, struct Episode *cur, | |||
249 | 260 | ||
250 | /* Get max rate */ | 261 | /* Get max rate */ |
251 | GNUNET_asprintf(&op_name, "op-%u-max-rate", op_counter); | 262 | GNUNET_asprintf(&op_name, "op-%u-max-rate", op_counter); |
252 | if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_number (cfg, | 263 | if (GNUNET_SYSERR == |
253 | sec_name, op_name, &o->max_rate)) | 264 | GNUNET_CONFIGURATION_get_value_number (cfg, |
265 | sec_name, | ||
266 | op_name, | ||
267 | &o->max_rate)) | ||
254 | { | 268 | { |
255 | if ((GNUNET_ATS_TEST_TG_LINEAR == o->gen_type) || | 269 | if ((GNUNET_ATS_TEST_TG_LINEAR == o->gen_type) || |
256 | (GNUNET_ATS_TEST_TG_RANDOM == o->gen_type) || | 270 | (GNUNET_ATS_TEST_TG_RANDOM == o->gen_type) || |