aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_quota_compliance.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2010-12-20 10:19:20 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2010-12-20 10:19:20 +0000
commit74b49da938b326325af08747e623e80c84bd715f (patch)
treeda403aceeacd170fc77f21ec3a45292590744039 /src/transport/test_quota_compliance.c
parent12598f93aa76e4f3289476970caea8a5dfe6b447 (diff)
downloadgnunet-74b49da938b326325af08747e623e80c84bd715f.tar.gz
gnunet-74b49da938b326325af08747e623e80c84bd715f.zip
Diffstat (limited to 'src/transport/test_quota_compliance.c')
-rw-r--r--src/transport/test_quota_compliance.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/transport/test_quota_compliance.c b/src/transport/test_quota_compliance.c
index 56d3cb5a4..a4a6692f0 100644
--- a/src/transport/test_quota_compliance.c
+++ b/src/transport/test_quota_compliance.c
@@ -391,10 +391,10 @@ measurement_end (void *cls,
391 quota_allowed = current_quota_p2; 391 quota_allowed = current_quota_p2;
392 392
393 393
394 if (MEASUREMENT_SOFT_LIMIT > (quota_allowed/10)) 394 if (MEASUREMENT_SOFT_LIMIT > (quota_allowed/3))
395 delta = MEASUREMENT_SOFT_LIMIT; 395 delta = MEASUREMENT_SOFT_LIMIT;
396 else 396 else
397 delta = (quota_allowed/10); 397 delta = (quota_allowed/3);
398 398
399 /* Throughput is far too slow. This is to prevent the test to exit with success when throughput is 0 */ 399 /* Throughput is far too slow. This is to prevent the test to exit with success when throughput is 0 */
400 if ((total_bytes_sent/(duration.rel_value / 1000)) < 100) 400 if ((total_bytes_sent/(duration.rel_value / 1000)) < 100)
@@ -411,7 +411,14 @@ measurement_end (void *cls,
411 ok = 1; 411 ok = 1;
412 failed_measurement_counter--; 412 failed_measurement_counter--;
413 if (failed_measurement_counter < 0) 413 if (failed_measurement_counter < 0)
414 {
415 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
416 "\nQuota measurement failed and no free strike: %i\n",failed_measurement_counter);
414 end(); 417 end();
418 }
419 else
420 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
421 "\nQuota measurement failed and %i free strikes\n",failed_measurement_counter);
415 return; 422 return;
416 } 423 }
417 424
@@ -430,7 +437,14 @@ measurement_end (void *cls,
430 ok = 1; 437 ok = 1;
431 failed_measurement_counter--; 438 failed_measurement_counter--;
432 if (failed_measurement_counter < 0) 439 if (failed_measurement_counter < 0)
440 {
441 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
442 "\nQuota measurement failed and no free strike: %i\n",failed_measurement_counter);
433 end(); 443 end();
444 }
445 else
446 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
447 "\nQuota measurement failed and %i free strikes\n",failed_measurement_counter);
434 return; 448 return;
435 } 449 }
436 else 450 else