diff options
Diffstat (limited to 'src/topology/gnunet-daemon-topology.c')
-rw-r--r-- | src/topology/gnunet-daemon-topology.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/topology/gnunet-daemon-topology.c b/src/topology/gnunet-daemon-topology.c index 61ee308f8..6687ee02a 100644 --- a/src/topology/gnunet-daemon-topology.c +++ b/src/topology/gnunet-daemon-topology.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | (C) 2007, 2008, 2009, 2010 Christian Grothoff (and other contributing authors) | 3 | (C) 2007-2013 Christian Grothoff (and other contributing authors) |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 5 | GNUnet is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published | 6 | it under the terms of the GNU General Public License as published |
@@ -362,7 +362,7 @@ attempt_connect (struct Peer *pos) | |||
362 | return; | 362 | return; |
363 | if (GNUNET_OK != is_connection_allowed (pos)) | 363 | if (GNUNET_OK != is_connection_allowed (pos)) |
364 | return; | 364 | return; |
365 | if (GNUNET_TIME_absolute_get_remaining (pos->greylisted_until).rel_value > 0) | 365 | if (GNUNET_TIME_absolute_get_remaining (pos->greylisted_until).rel_value_us > 0) |
366 | return; | 366 | return; |
367 | if (GNUNET_YES == pos->is_friend) | 367 | if (GNUNET_YES == pos->is_friend) |
368 | rem = GREYLIST_AFTER_ATTEMPT_FRIEND; | 368 | rem = GREYLIST_AFTER_ATTEMPT_FRIEND; |
@@ -407,7 +407,7 @@ do_attempt_connect (void *cls, | |||
407 | if (GNUNET_YES == pos->is_connected) | 407 | if (GNUNET_YES == pos->is_connected) |
408 | return; | 408 | return; |
409 | delay = GNUNET_TIME_absolute_get_remaining (next_connect_attempt); | 409 | delay = GNUNET_TIME_absolute_get_remaining (next_connect_attempt); |
410 | if (delay.rel_value > 0) | 410 | if (delay.rel_value_us > 0) |
411 | { | 411 | { |
412 | pos->attempt_connect_task = GNUNET_SCHEDULER_add_delayed (delay, | 412 | pos->attempt_connect_task = GNUNET_SCHEDULER_add_delayed (delay, |
413 | &do_attempt_connect, | 413 | &do_attempt_connect, |
@@ -450,7 +450,7 @@ remove_from_greylist (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
450 | 450 | ||
451 | pos->greylist_clean_task = GNUNET_SCHEDULER_NO_TASK; | 451 | pos->greylist_clean_task = GNUNET_SCHEDULER_NO_TASK; |
452 | rem = GNUNET_TIME_absolute_get_remaining (pos->greylisted_until); | 452 | rem = GNUNET_TIME_absolute_get_remaining (pos->greylisted_until); |
453 | if (rem.rel_value == 0) | 453 | if (0 == rem.rel_value_us) |
454 | { | 454 | { |
455 | schedule_attempt_connect (pos); | 455 | schedule_attempt_connect (pos); |
456 | } | 456 | } |
@@ -580,7 +580,7 @@ find_advertisable_hello (void *cls, const struct GNUNET_HashCode * pid, void *va | |||
580 | if (pos->hello == NULL) | 580 | if (pos->hello == NULL) |
581 | return GNUNET_YES; | 581 | return GNUNET_YES; |
582 | rst_time = GNUNET_TIME_absolute_get_remaining (pos->filter_expiration); | 582 | rst_time = GNUNET_TIME_absolute_get_remaining (pos->filter_expiration); |
583 | if (0 == rst_time.rel_value) | 583 | if (0 == rst_time.rel_value_us) |
584 | { | 584 | { |
585 | /* time to discard... */ | 585 | /* time to discard... */ |
586 | GNUNET_CONTAINER_bloomfilter_free (pos->filter); | 586 | GNUNET_CONTAINER_bloomfilter_free (pos->filter); |
@@ -631,7 +631,7 @@ schedule_next_hello (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
631 | return; | 631 | return; |
632 | next_want = GNUNET_HELLO_size (fah.result->hello); | 632 | next_want = GNUNET_HELLO_size (fah.result->hello); |
633 | delay = GNUNET_TIME_absolute_get_remaining (pl->next_hello_allowed); | 633 | delay = GNUNET_TIME_absolute_get_remaining (pl->next_hello_allowed); |
634 | if (delay.rel_value == 0) | 634 | if (0 == delay.rel_value_us) |
635 | { | 635 | { |
636 | /* now! */ | 636 | /* now! */ |
637 | pl->hello_req = | 637 | pl->hello_req = |
@@ -708,7 +708,7 @@ connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
708 | else | 708 | else |
709 | { | 709 | { |
710 | GNUNET_assert (GNUNET_NO == pos->is_connected); | 710 | GNUNET_assert (GNUNET_NO == pos->is_connected); |
711 | pos->greylisted_until.abs_value = 0; /* remove greylisting */ | 711 | pos->greylisted_until.abs_value_us = 0; /* remove greylisting */ |
712 | } | 712 | } |
713 | pos->is_connected = GNUNET_YES; | 713 | pos->is_connected = GNUNET_YES; |
714 | pos->connect_attempts = 0; /* re-set back-off factor */ | 714 | pos->connect_attempts = 0; /* re-set back-off factor */ |
@@ -870,7 +870,7 @@ consider_for_advertising (const struct GNUNET_HELLO_Message *hello) | |||
870 | else if (peer->hello != NULL) | 870 | else if (peer->hello != NULL) |
871 | { | 871 | { |
872 | dt = GNUNET_HELLO_equals (peer->hello, hello, GNUNET_TIME_absolute_get ()); | 872 | dt = GNUNET_HELLO_equals (peer->hello, hello, GNUNET_TIME_absolute_get ()); |
873 | if (dt.abs_value == GNUNET_TIME_UNIT_FOREVER_ABS.abs_value) | 873 | if (dt.abs_value_us == GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us) |
874 | return; /* nothing new here */ | 874 | return; /* nothing new here */ |
875 | } | 875 | } |
876 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 876 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -940,7 +940,7 @@ process_peer (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
940 | if ((GNUNET_NO == pos->is_connected) && (GNUNET_NO == pos->is_friend) && | 940 | if ((GNUNET_NO == pos->is_connected) && (GNUNET_NO == pos->is_friend) && |
941 | (0 == | 941 | (0 == |
942 | GNUNET_TIME_absolute_get_remaining (pos-> | 942 | GNUNET_TIME_absolute_get_remaining (pos-> |
943 | greylisted_until).rel_value)) | 943 | greylisted_until).rel_value_us)) |
944 | free_peer (NULL, &pos->pid.hashPubKey, pos); | 944 | free_peer (NULL, &pos->pid.hashPubKey, pos); |
945 | } | 945 | } |
946 | return; | 946 | return; |
@@ -956,7 +956,7 @@ process_peer (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
956 | GNUNET_i2s (peer)); | 956 | GNUNET_i2s (peer)); |
957 | return; | 957 | return; |
958 | } | 958 | } |
959 | if (GNUNET_TIME_absolute_get_remaining (pos->greylisted_until).rel_value > 0) | 959 | if (GNUNET_TIME_absolute_get_remaining (pos->greylisted_until).rel_value_us > 0) |
960 | { | 960 | { |
961 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Already tried peer `%s' recently\n", | 961 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Already tried peer `%s' recently\n", |
962 | GNUNET_i2s (peer)); | 962 | GNUNET_i2s (peer)); |