diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-02-02 23:03:04 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-02-02 23:03:04 +0000 |
commit | 5cc8737d69e25eacb662824cd725db61c73b5dd4 (patch) | |
tree | b61d0f1b502b8b11ca3f55637cbfb2c5d9cabf96 /src/transport/gnunet-service-transport_validation.c | |
parent | ffd9516faaaa7d2a9595039d10a759bb07988b77 (diff) | |
download | gnunet-5cc8737d69e25eacb662824cd725db61c73b5dd4.tar.gz gnunet-5cc8737d69e25eacb662824cd725db61c73b5dd4.zip |
get_address_latency also does not use session
Diffstat (limited to 'src/transport/gnunet-service-transport_validation.c')
-rw-r--r-- | src/transport/gnunet-service-transport_validation.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c index b2948d086..e6e27a90d 100644 --- a/src/transport/gnunet-service-transport_validation.c +++ b/src/transport/gnunet-service-transport_validation.c | |||
@@ -1644,19 +1644,21 @@ GST_validation_set_address_use (const struct GNUNET_HELLO_Address *address, | |||
1644 | { | 1644 | { |
1645 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 1645 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
1646 | "Error setting address in use for peer `%s' `%s' to USED\n", | 1646 | "Error setting address in use for peer `%s' `%s' to USED\n", |
1647 | GNUNET_i2s (&address->peer), GST_plugins_a2s (address)); | 1647 | GNUNET_i2s (&address->peer), |
1648 | GST_plugins_a2s (address)); | ||
1648 | } | 1649 | } |
1649 | if (GNUNET_NO == in_use) | 1650 | if (GNUNET_NO == in_use) |
1650 | { | 1651 | { |
1651 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 1652 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
1652 | "Error setting address in use for peer `%s' `%s' to NOT_USED\n", | 1653 | "Error setting address in use for peer `%s' `%s' to NOT_USED\n", |
1653 | GNUNET_i2s (&address->peer), GST_plugins_a2s (address)); | 1654 | GNUNET_i2s (&address->peer), |
1655 | GST_plugins_a2s (address)); | ||
1654 | } | 1656 | } |
1655 | } | 1657 | } |
1656 | 1658 | ||
1657 | GNUNET_break (ve->in_use != in_use); /* should be different... */ | 1659 | GNUNET_break (ve->in_use != in_use); /* should be different... */ |
1658 | ve->in_use = in_use; | 1660 | ve->in_use = in_use; |
1659 | if (in_use == GNUNET_YES) | 1661 | if (GNUNET_YES == in_use) |
1660 | { | 1662 | { |
1661 | /* from now on, higher frequeny, so reschedule now */ | 1663 | /* from now on, higher frequeny, so reschedule now */ |
1662 | if (NULL != ve->revalidation_task) | 1664 | if (NULL != ve->revalidation_task) |
@@ -1671,13 +1673,11 @@ GST_validation_set_address_use (const struct GNUNET_HELLO_Address *address, | |||
1671 | * address. | 1673 | * address. |
1672 | * | 1674 | * |
1673 | * @param address the address | 1675 | * @param address the address |
1674 | * @param session session | ||
1675 | * @return observed latency of the address, FOREVER if the address was | 1676 | * @return observed latency of the address, FOREVER if the address was |
1676 | * never successfully validated | 1677 | * never successfully validated |
1677 | */ | 1678 | */ |
1678 | struct GNUNET_TIME_Relative | 1679 | struct GNUNET_TIME_Relative |
1679 | GST_validation_get_address_latency (const struct GNUNET_HELLO_Address *address, | 1680 | GST_validation_get_address_latency (const struct GNUNET_HELLO_Address *address) |
1680 | struct Session *session) | ||
1681 | { | 1681 | { |
1682 | struct ValidationEntry *ve; | 1682 | struct ValidationEntry *ve; |
1683 | 1683 | ||
@@ -1691,13 +1691,13 @@ GST_validation_get_address_latency (const struct GNUNET_HELLO_Address *address, | |||
1691 | GNUNET_break (0); /* but we don't have the plugin! */ | 1691 | GNUNET_break (0); /* but we don't have the plugin! */ |
1692 | return GNUNET_TIME_UNIT_FOREVER_REL; | 1692 | return GNUNET_TIME_UNIT_FOREVER_REL; |
1693 | } | 1693 | } |
1694 | |||
1695 | ve = find_validation_entry (address); | 1694 | ve = find_validation_entry (address); |
1696 | if (NULL == ve) | 1695 | if (NULL == ve) |
1697 | return GNUNET_TIME_UNIT_FOREVER_REL; | 1696 | return GNUNET_TIME_UNIT_FOREVER_REL; |
1698 | return ve->latency; | 1697 | return ve->latency; |
1699 | } | 1698 | } |
1700 | 1699 | ||
1700 | |||
1701 | /** | 1701 | /** |
1702 | * Closure for the validation_entries_iterate function. | 1702 | * Closure for the validation_entries_iterate function. |
1703 | */ | 1703 | */ |
@@ -1751,7 +1751,7 @@ validation_entries_iterate (void *cls, | |||
1751 | * Iterate over all iteration entries | 1751 | * Iterate over all iteration entries |
1752 | * | 1752 | * |
1753 | * @param cb function to call | 1753 | * @param cb function to call |
1754 | * @param cb_cls closure for cb | 1754 | * @param cb_cls closure for @a cb |
1755 | */ | 1755 | */ |
1756 | void | 1756 | void |
1757 | GST_validation_iterate (GST_ValidationChangedCallback cb, | 1757 | GST_validation_iterate (GST_ValidationChangedCallback cb, |