aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_transport_api_unreliability_constant.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2011-09-29 11:51:25 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2011-09-29 11:51:25 +0000
commit48caf49857d42bedbc97314a0b622d007a942cbd (patch)
treefd1cda8866b87341513180fcd5a7f48647b116e3 /src/transport/test_transport_api_unreliability_constant.c
parent8692e8c0d753f8cf7ff516f628ab6ff2b1a3471b (diff)
downloadgnunet-48caf49857d42bedbc97314a0b622d007a942cbd.tar.gz
gnunet-48caf49857d42bedbc97314a0b622d007a942cbd.zip
removing quota set to max_bps cfg setting
Diffstat (limited to 'src/transport/test_transport_api_unreliability_constant.c')
-rw-r--r--src/transport/test_transport_api_unreliability_constant.c30
1 files changed, 2 insertions, 28 deletions
diff --git a/src/transport/test_transport_api_unreliability_constant.c b/src/transport/test_transport_api_unreliability_constant.c
index f2f1038d6..5ad6c6afb 100644
--- a/src/transport/test_transport_api_unreliability_constant.c
+++ b/src/transport/test_transport_api_unreliability_constant.c
@@ -364,40 +364,14 @@ notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
364 364
365 if (cls == p1) 365 if (cls == p1)
366 { 366 {
367 char * sec; 367 max_bps_p1 = 1024 * 1024 * 1024;
368 long long unsigned int l_bps;
369
370 GNUNET_asprintf(&sec, "transport-%s", test_plugin);
371 if (GNUNET_CONFIGURATION_have_value (p1->cfg, sec, "MAX_BPS"))
372 {
373 GNUNET_CONFIGURATION_get_value_number (p1->cfg, sec, "MAX_BPS",
374 &l_bps);
375 max_bps_p1 = l_bps;
376 }
377 else
378 max_bps_p1 = 1024 * 1024 * 1024;
379 GNUNET_free (sec);
380
381 GNUNET_TRANSPORT_set_quota (p1->th, &p2->id, 368 GNUNET_TRANSPORT_set_quota (p1->th, &p2->id,
382 GNUNET_BANDWIDTH_value_init (max_bps_p1), 369 GNUNET_BANDWIDTH_value_init (max_bps_p1),
383 GNUNET_BANDWIDTH_value_init (max_bps_p1)); 370 GNUNET_BANDWIDTH_value_init (max_bps_p1));
384 } 371 }
385 else if (cls == p2) 372 else if (cls == p2)
386 { 373 {
387 char * sec; 374 max_bps_p2 = 1024 * 1024 * 1024;
388 long long unsigned int l_bps;
389
390 GNUNET_asprintf(&sec, "transport-%s", test_plugin);
391 if (GNUNET_CONFIGURATION_have_value (p2->cfg, sec, "MAX_BPS"))
392 {
393 GNUNET_CONFIGURATION_get_value_number (p2->cfg, sec, "MAX_BPS",
394 &l_bps);
395 max_bps_p2 = l_bps;
396 }
397 else
398 max_bps_p2 = 1024 * 1024 * 1024;
399 GNUNET_free (sec);
400
401 GNUNET_TRANSPORT_set_quota (p2->th, &p1->id, 375 GNUNET_TRANSPORT_set_quota (p2->th, &p1->id,
402 GNUNET_BANDWIDTH_value_init (max_bps_p2), 376 GNUNET_BANDWIDTH_value_init (max_bps_p2),
403 GNUNET_BANDWIDTH_value_init (max_bps_p2)); 377 GNUNET_BANDWIDTH_value_init (max_bps_p2));