diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2014-02-03 09:58:18 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2014-02-03 09:58:18 +0000 |
commit | c25e21e16f0079b94b4ee71240013e16b425240d (patch) | |
tree | cceded3c132bd620c4b8ae3c8532e6a8fcc889cd /src/ats-tests/ats-testing-experiment.c | |
parent | 2debb60e6a2c3cafab0c9095944d316672a8b4a0 (diff) | |
download | gnunet-c25e21e16f0079b94b4ee71240013e16b425240d.tar.gz gnunet-c25e21e16f0079b94b4ee71240013e16b425240d.zip |
safety checks
Diffstat (limited to 'src/ats-tests/ats-testing-experiment.c')
-rw-r--r-- | src/ats-tests/ats-testing-experiment.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ats-tests/ats-testing-experiment.c b/src/ats-tests/ats-testing-experiment.c index 1ab1342c5..80f30d9f0 100644 --- a/src/ats-tests/ats-testing-experiment.c +++ b/src/ats-tests/ats-testing-experiment.c | |||
@@ -256,6 +256,18 @@ load_episode (struct Experiment *e, struct Episode *cur, | |||
256 | } | 256 | } |
257 | } | 257 | } |
258 | 258 | ||
259 | /* Safety checks */ | ||
260 | if ((GNUNET_ATS_TEST_TG_LINEAR == o->tg_type) || | ||
261 | (GNUNET_ATS_TEST_TG_SINUS == o->tg_type)) | ||
262 | { | ||
263 | if ((o->max_rate - o->base_rate) > o->base_rate) | ||
264 | { | ||
265 | /* This will cause an underflow */ | ||
266 | GNUNET_break (0); | ||
267 | } | ||
268 | fprintf (stderr, "Selected max rate and base rate cannot be used for desired traffic form!\n"); | ||
269 | } | ||
270 | |||
259 | fprintf (stderr, "Found operation %u in episode %u: %s [%llu]->[%llu] == %s, %llu -> %llu in %s\n", | 271 | fprintf (stderr, "Found operation %u in episode %u: %s [%llu]->[%llu] == %s, %llu -> %llu in %s\n", |
260 | op_counter, cur->id, print_op (o->type), o->src_id, | 272 | op_counter, cur->id, print_op (o->type), o->src_id, |
261 | o->dest_id, type, o->base_rate, o->max_rate, | 273 | o->dest_id, type, o->base_rate, o->max_rate, |