diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2014-03-20 09:58:43 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2014-03-20 09:58:43 +0000 |
commit | ad410474d7c7a71f726860e936200f80feedca1f (patch) | |
tree | 76ebef7de101cf810d61cb7ff6ea0d52dd0550a8 /src | |
parent | 173a142f9b7acd4a788f41dd23ca349cd4b901e9 (diff) | |
download | gnunet-ad410474d7c7a71f726860e936200f80feedca1f.tar.gz gnunet-ad410474d7c7a71f726860e936200f80feedca1f.zip |
renaming generator type for ats
addign comment for bandwidth
Diffstat (limited to 'src')
-rw-r--r-- | src/ats-tests/ats-testing-experiment.c | 22 | ||||
-rw-r--r-- | src/ats-tests/ats-testing.h | 2 | ||||
-rw-r--r-- | src/ats-tests/gnunet-solver-eval.c | 18 | ||||
-rw-r--r-- | src/util/bandwidth.c | 3 |
4 files changed, 24 insertions, 21 deletions
diff --git a/src/ats-tests/ats-testing-experiment.c b/src/ats-tests/ats-testing-experiment.c index ae92b58c2..97409e2a2 100644 --- a/src/ats-tests/ats-testing-experiment.c +++ b/src/ats-tests/ats-testing-experiment.c | |||
@@ -188,19 +188,19 @@ load_episode (struct Experiment *e, struct Episode *cur, | |||
188 | /* Load arguments for set_rate, start_send, set_preference */ | 188 | /* Load arguments for set_rate, start_send, set_preference */ |
189 | if (0 == strcmp (type, "constant")) | 189 | if (0 == strcmp (type, "constant")) |
190 | { | 190 | { |
191 | o->tg_type = GNUNET_ATS_TEST_TG_CONSTANT; | 191 | o->gen_type = GNUNET_ATS_TEST_TG_CONSTANT; |
192 | } | 192 | } |
193 | else if (0 == strcmp (type, "linear")) | 193 | else if (0 == strcmp (type, "linear")) |
194 | { | 194 | { |
195 | o->tg_type = GNUNET_ATS_TEST_TG_LINEAR; | 195 | o->gen_type = GNUNET_ATS_TEST_TG_LINEAR; |
196 | } | 196 | } |
197 | else if (0 == strcmp (type, "sinus")) | 197 | else if (0 == strcmp (type, "sinus")) |
198 | { | 198 | { |
199 | o->tg_type = GNUNET_ATS_TEST_TG_SINUS; | 199 | o->gen_type = GNUNET_ATS_TEST_TG_SINUS; |
200 | } | 200 | } |
201 | else if (0 == strcmp (type, "random")) | 201 | else if (0 == strcmp (type, "random")) |
202 | { | 202 | { |
203 | o->tg_type = GNUNET_ATS_TEST_TG_RANDOM; | 203 | o->gen_type = GNUNET_ATS_TEST_TG_RANDOM; |
204 | } | 204 | } |
205 | else | 205 | else |
206 | { | 206 | { |
@@ -232,9 +232,9 @@ load_episode (struct Experiment *e, struct Episode *cur, | |||
232 | if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_number (cfg, | 232 | if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_number (cfg, |
233 | sec_name, op_name, &o->max_rate)) | 233 | sec_name, op_name, &o->max_rate)) |
234 | { | 234 | { |
235 | if ((GNUNET_ATS_TEST_TG_LINEAR == o->tg_type) || | 235 | if ((GNUNET_ATS_TEST_TG_LINEAR == o->gen_type) || |
236 | (GNUNET_ATS_TEST_TG_RANDOM == o->tg_type) || | 236 | (GNUNET_ATS_TEST_TG_RANDOM == o->gen_type) || |
237 | (GNUNET_ATS_TEST_TG_SINUS == o->tg_type)) | 237 | (GNUNET_ATS_TEST_TG_SINUS == o->gen_type)) |
238 | { | 238 | { |
239 | fprintf (stderr, "Missing max rate in operation %u `%s' in episode %u\n", | 239 | fprintf (stderr, "Missing max rate in operation %u `%s' in episode %u\n", |
240 | op_counter, op, cur->id); | 240 | op_counter, op, cur->id); |
@@ -306,8 +306,8 @@ load_episode (struct Experiment *e, struct Episode *cur, | |||
306 | } | 306 | } |
307 | 307 | ||
308 | /* Safety checks */ | 308 | /* Safety checks */ |
309 | if ((GNUNET_ATS_TEST_TG_LINEAR == o->tg_type) || | 309 | if ((GNUNET_ATS_TEST_TG_LINEAR == o->gen_type) || |
310 | (GNUNET_ATS_TEST_TG_SINUS == o->tg_type)) | 310 | (GNUNET_ATS_TEST_TG_SINUS == o->gen_type)) |
311 | { | 311 | { |
312 | if ((o->max_rate - o->base_rate) > o->base_rate) | 312 | if ((o->max_rate - o->base_rate) > o->base_rate) |
313 | { | 313 | { |
@@ -437,7 +437,7 @@ enforce_start_send (struct GNUNET_ATS_TEST_Operation *op) | |||
437 | } | 437 | } |
438 | 438 | ||
439 | partner->tg = GNUNET_ATS_TEST_generate_traffic_start(peer, partner, | 439 | partner->tg = GNUNET_ATS_TEST_generate_traffic_start(peer, partner, |
440 | op->tg_type, op->base_rate, op->max_rate, op->period, | 440 | op->gen_type, op->base_rate, op->max_rate, op->period, |
441 | GNUNET_TIME_UNIT_FOREVER_REL); | 441 | GNUNET_TIME_UNIT_FOREVER_REL); |
442 | } | 442 | } |
443 | 443 | ||
@@ -495,7 +495,7 @@ enforce_start_preference (struct GNUNET_ATS_TEST_Operation *op) | |||
495 | } | 495 | } |
496 | 496 | ||
497 | partner->pg = GNUNET_ATS_TEST_generate_preferences_start(peer, partner, | 497 | partner->pg = GNUNET_ATS_TEST_generate_preferences_start(peer, partner, |
498 | op->tg_type, op->base_rate, op->max_rate, op->period, op->frequency, | 498 | op->gen_type, op->base_rate, op->max_rate, op->period, op->frequency, |
499 | op->pref_type); | 499 | op->pref_type); |
500 | } | 500 | } |
501 | 501 | ||
diff --git a/src/ats-tests/ats-testing.h b/src/ats-tests/ats-testing.h index 86c26eb81..ef3819ce4 100644 --- a/src/ats-tests/ats-testing.h +++ b/src/ats-tests/ats-testing.h | |||
@@ -496,7 +496,7 @@ struct GNUNET_ATS_TEST_Operation | |||
496 | struct GNUNET_TIME_Relative frequency; | 496 | struct GNUNET_TIME_Relative frequency; |
497 | 497 | ||
498 | enum OperationType type; | 498 | enum OperationType type; |
499 | enum GeneratorType tg_type; | 499 | enum GeneratorType gen_type; |
500 | enum GNUNET_ATS_PreferenceKind pref_type; | 500 | enum GNUNET_ATS_PreferenceKind pref_type; |
501 | }; | 501 | }; |
502 | 502 | ||
diff --git a/src/ats-tests/gnunet-solver-eval.c b/src/ats-tests/gnunet-solver-eval.c index 0d2fae113..7b6972af7 100644 --- a/src/ats-tests/gnunet-solver-eval.c +++ b/src/ats-tests/gnunet-solver-eval.c | |||
@@ -195,19 +195,19 @@ load_episode (struct Experiment *e, struct Episode *cur, | |||
195 | /* Load arguments for set_rate, start_send, set_preference */ | 195 | /* Load arguments for set_rate, start_send, set_preference */ |
196 | if (0 == strcmp (type, "constant")) | 196 | if (0 == strcmp (type, "constant")) |
197 | { | 197 | { |
198 | o->tg_type = GNUNET_ATS_TEST_TG_CONSTANT; | 198 | o->gen_type = GNUNET_ATS_TEST_TG_CONSTANT; |
199 | } | 199 | } |
200 | else if (0 == strcmp (type, "linear")) | 200 | else if (0 == strcmp (type, "linear")) |
201 | { | 201 | { |
202 | o->tg_type = GNUNET_ATS_TEST_TG_LINEAR; | 202 | o->gen_type = GNUNET_ATS_TEST_TG_LINEAR; |
203 | } | 203 | } |
204 | else if (0 == strcmp (type, "sinus")) | 204 | else if (0 == strcmp (type, "sinus")) |
205 | { | 205 | { |
206 | o->tg_type = GNUNET_ATS_TEST_TG_SINUS; | 206 | o->gen_type = GNUNET_ATS_TEST_TG_SINUS; |
207 | } | 207 | } |
208 | else if (0 == strcmp (type, "random")) | 208 | else if (0 == strcmp (type, "random")) |
209 | { | 209 | { |
210 | o->tg_type = GNUNET_ATS_TEST_TG_RANDOM; | 210 | o->gen_type = GNUNET_ATS_TEST_TG_RANDOM; |
211 | } | 211 | } |
212 | else | 212 | else |
213 | { | 213 | { |
@@ -239,9 +239,9 @@ load_episode (struct Experiment *e, struct Episode *cur, | |||
239 | if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_number (cfg, | 239 | if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_number (cfg, |
240 | sec_name, op_name, &o->max_rate)) | 240 | sec_name, op_name, &o->max_rate)) |
241 | { | 241 | { |
242 | if ((GNUNET_ATS_TEST_TG_LINEAR == o->tg_type) || | 242 | if ((GNUNET_ATS_TEST_TG_LINEAR == o->gen_type) || |
243 | (GNUNET_ATS_TEST_TG_RANDOM == o->tg_type) || | 243 | (GNUNET_ATS_TEST_TG_RANDOM == o->gen_type) || |
244 | (GNUNET_ATS_TEST_TG_SINUS == o->tg_type)) | 244 | (GNUNET_ATS_TEST_TG_SINUS == o->gen_type)) |
245 | { | 245 | { |
246 | fprintf (stderr, "Missing max rate in operation %u `%s' in episode %u\n", | 246 | fprintf (stderr, "Missing max rate in operation %u `%s' in episode %u\n", |
247 | op_counter, op, cur->id); | 247 | op_counter, op, cur->id); |
@@ -313,8 +313,8 @@ load_episode (struct Experiment *e, struct Episode *cur, | |||
313 | } | 313 | } |
314 | 314 | ||
315 | /* Safety checks */ | 315 | /* Safety checks */ |
316 | if ((GNUNET_ATS_TEST_TG_LINEAR == o->tg_type) || | 316 | if ((GNUNET_ATS_TEST_TG_LINEAR == o->gen_type) || |
317 | (GNUNET_ATS_TEST_TG_SINUS == o->tg_type)) | 317 | (GNUNET_ATS_TEST_TG_SINUS == o->gen_type)) |
318 | { | 318 | { |
319 | if ((o->max_rate - o->base_rate) > o->base_rate) | 319 | if ((o->max_rate - o->base_rate) > o->base_rate) |
320 | { | 320 | { |
diff --git a/src/util/bandwidth.c b/src/util/bandwidth.c index 2a1a4011b..18b846869 100644 --- a/src/util/bandwidth.c +++ b/src/util/bandwidth.c | |||
@@ -196,6 +196,9 @@ update_excess (struct GNUNET_BANDWIDTH_Tracker *av) | |||
196 | * ignored and replaced by #GNUNET_SERVER_MAX_MESSAGE_SIZE (which is in | 196 | * ignored and replaced by #GNUNET_SERVER_MAX_MESSAGE_SIZE (which is in |
197 | * bytes). | 197 | * bytes). |
198 | * | 198 | * |
199 | * To stop notifications about updates and excess callbacks use | ||
200 | * #GNUNET_BANDWIDTH_tracker_notification_stop | ||
201 | * | ||
199 | * @param av tracker to initialize | 202 | * @param av tracker to initialize |
200 | * @param update_cb callback to notify a client about the tracker being updated | 203 | * @param update_cb callback to notify a client about the tracker being updated |
201 | * @param update_cb_cls cls for the callback | 204 | * @param update_cb_cls cls for the callback |