diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2012-10-24 16:08:23 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2012-10-24 16:08:23 +0000 |
commit | 20e7f1aee4f3bcdd46ff99a5a9e5ba81765cb878 (patch) | |
tree | 42b5ad6ce8ac3b4145627e745716979e03490596 /src | |
parent | 1e56c37350ceeb996b553720023c1adfa739b6ce (diff) | |
download | gnunet-20e7f1aee4f3bcdd46ff99a5a9e5ba81765cb878.tar.gz gnunet-20e7f1aee4f3bcdd46ff99a5a9e5ba81765cb878.zip |
removed exponential backoff while offering HELLO
Diffstat (limited to 'src')
-rw-r--r-- | src/testbed/gnunet-service-testbed.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/testbed/gnunet-service-testbed.c b/src/testbed/gnunet-service-testbed.c index 9dc390e23..1c6bfe013 100644 --- a/src/testbed/gnunet-service-testbed.c +++ b/src/testbed/gnunet-service-testbed.c | |||
@@ -600,11 +600,6 @@ struct OverlayConnectContext | |||
600 | */ | 600 | */ |
601 | uint32_t other_peer_id; | 601 | uint32_t other_peer_id; |
602 | 602 | ||
603 | /** | ||
604 | * Number of times we tried to send hello; used to increase delay in offering | ||
605 | * hellos | ||
606 | */ | ||
607 | uint16_t retries; | ||
608 | }; | 603 | }; |
609 | 604 | ||
610 | 605 | ||
@@ -651,12 +646,6 @@ struct RequestOverlayConnectContext | |||
651 | */ | 646 | */ |
652 | GNUNET_SCHEDULER_TaskIdentifier timeout_rocc_task_id; | 647 | GNUNET_SCHEDULER_TaskIdentifier timeout_rocc_task_id; |
653 | 648 | ||
654 | /** | ||
655 | * Number of times we tried to send hello; used to increase delay in offering | ||
656 | * hellos | ||
657 | */ | ||
658 | uint16_t retries; | ||
659 | |||
660 | }; | 649 | }; |
661 | 650 | ||
662 | 651 | ||
@@ -2919,7 +2908,8 @@ send_hello (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
2919 | occ->send_hello_task = | 2908 | occ->send_hello_task = |
2920 | GNUNET_SCHEDULER_add_delayed | 2909 | GNUNET_SCHEDULER_add_delayed |
2921 | (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, | 2910 | (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, |
2922 | 100 * (pow (2, occ->retries++))), | 2911 | 100 + GNUNET_CRYPTO_random_u32 |
2912 | (GNUNET_CRYPTO_QUALITY_WEAK, 500)), | ||
2923 | &send_hello, occ); | 2913 | &send_hello, occ); |
2924 | } | 2914 | } |
2925 | GNUNET_free (other_peer_str); | 2915 | GNUNET_free (other_peer_str); |
@@ -3485,7 +3475,8 @@ attempt_connect_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
3485 | rocc->attempt_connect_task_id = | 3475 | rocc->attempt_connect_task_id = |
3486 | GNUNET_SCHEDULER_add_delayed | 3476 | GNUNET_SCHEDULER_add_delayed |
3487 | (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, | 3477 | (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, |
3488 | 100 * (pow (2, rocc->retries++))), | 3478 | 100 + GNUNET_CRYPTO_random_u32 |
3479 | (GNUNET_CRYPTO_QUALITY_WEAK, 500)), | ||
3489 | &attempt_connect_task, rocc); | 3480 | &attempt_connect_task, rocc); |
3490 | } | 3481 | } |
3491 | 3482 | ||