diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-01-18 17:31:14 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-01-18 17:31:14 +0000 |
commit | bb720291e7a5a71e9139865f97025bfa179cd3a3 (patch) | |
tree | 09d1184ae8155aa7906a6823e4b9b432a4bfb7ec /src/transport/gnunet-service-transport_validation.c | |
parent | c5f60b28bfafd0b8196eb110e7cb3a8a1b12aa0f (diff) | |
download | gnunet-bb720291e7a5a71e9139865f97025bfa179cd3a3.tar.gz gnunet-bb720291e7a5a71e9139865f97025bfa179cd3a3.zip |
-remarking on things to fix
Diffstat (limited to 'src/transport/gnunet-service-transport_validation.c')
-rw-r--r-- | src/transport/gnunet-service-transport_validation.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c index e7ede0b07..b02c90009 100644 --- a/src/transport/gnunet-service-transport_validation.c +++ b/src/transport/gnunet-service-transport_validation.c | |||
@@ -833,13 +833,13 @@ add_valid_address (void *cls, | |||
833 | } | 833 | } |
834 | 834 | ||
835 | ve = find_validation_entry (&public_key, address); | 835 | ve = find_validation_entry (&public_key, address); |
836 | ve->valid_until = GNUNET_TIME_absolute_max (ve->valid_until, expiration); | 836 | ve->valid_until = GNUNET_TIME_absolute_max (ve->valid_until, |
837 | 837 | expiration); | |
838 | if (NULL == ve->revalidation_task) | 838 | if (NULL == ve->revalidation_task) |
839 | { | 839 | { |
840 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 840 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
841 | "Starting revalidations for valid address `%s'\n", | 841 | "Starting revalidations for valid address `%s'\n", |
842 | GST_plugins_a2s (ve->address)); | 842 | GST_plugins_a2s (ve->address)); |
843 | ve->next_validation = GNUNET_TIME_absolute_get(); | 843 | ve->next_validation = GNUNET_TIME_absolute_get(); |
844 | ve->revalidation_task = GNUNET_SCHEDULER_add_now (&revalidate_address, ve); | 844 | ve->revalidation_task = GNUNET_SCHEDULER_add_now (&revalidate_address, ve); |
845 | } | 845 | } |
@@ -1417,8 +1417,9 @@ GST_validation_handle_pong (const struct GNUNET_PeerIdentity *sender, | |||
1417 | GNUNET_break_op (0); | 1417 | GNUNET_break_op (0); |
1418 | return GNUNET_SYSERR; | 1418 | return GNUNET_SYSERR; |
1419 | } | 1419 | } |
1420 | if (GNUNET_TIME_absolute_get_remaining | 1420 | if (0 == |
1421 | (GNUNET_TIME_absolute_ntoh (pong->expiration)).rel_value_us == 0) | 1421 | GNUNET_TIME_absolute_get_remaining |
1422 | (GNUNET_TIME_absolute_ntoh (pong->expiration)).rel_value_us) | ||
1422 | { | 1423 | { |
1423 | GNUNET_STATISTICS_update (GST_stats, | 1424 | GNUNET_STATISTICS_update (GST_stats, |
1424 | gettext_noop | 1425 | gettext_noop |
@@ -1490,6 +1491,7 @@ GST_validation_handle_pong (const struct GNUNET_PeerIdentity *sender, | |||
1490 | ats[0].value = htonl ((uint32_t) ve->latency.rel_value_us); | 1491 | ats[0].value = htonl ((uint32_t) ve->latency.rel_value_us); |
1491 | ats[1].type = htonl (GNUNET_ATS_NETWORK_TYPE); | 1492 | ats[1].type = htonl (GNUNET_ATS_NETWORK_TYPE); |
1492 | ats[1].value = htonl ((uint32_t) ve->network); | 1493 | ats[1].value = htonl ((uint32_t) ve->network); |
1494 | // FIXME: add vs. update! | ||
1493 | GNUNET_ATS_address_add (GST_ats, ve->address, NULL, ats, 2); | 1495 | GNUNET_ATS_address_add (GST_ats, ve->address, NULL, ats, 2); |
1494 | } | 1496 | } |
1495 | if (validations_running > 0) | 1497 | if (validations_running > 0) |