aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/transport/gnunet-service-transport_validation.c16
-rw-r--r--src/transport/gnunet-service-transport_validation.h4
2 files changed, 9 insertions, 11 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 */
1678struct GNUNET_TIME_Relative 1679struct GNUNET_TIME_Relative
1679GST_validation_get_address_latency (const struct GNUNET_HELLO_Address *address, 1680GST_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 */
1756void 1756void
1757GST_validation_iterate (GST_ValidationChangedCallback cb, 1757GST_validation_iterate (GST_ValidationChangedCallback cb,
diff --git a/src/transport/gnunet-service-transport_validation.h b/src/transport/gnunet-service-transport_validation.h
index 337b47123..d7bbcd8be 100644
--- a/src/transport/gnunet-service-transport_validation.h
+++ b/src/transport/gnunet-service-transport_validation.h
@@ -66,13 +66,11 @@ GST_validation_set_address_use (const struct GNUNET_HELLO_Address *address,
66 * address. 66 * address.
67 * 67 *
68 * @param address the address 68 * @param address the address
69 * @param session session
70 * @return observed latency of the address, FOREVER if the address was 69 * @return observed latency of the address, FOREVER if the address was
71 * never successfully validated 70 * never successfully validated
72 */ 71 */
73struct GNUNET_TIME_Relative 72struct GNUNET_TIME_Relative
74GST_validation_get_address_latency (const struct GNUNET_HELLO_Address *address, 73GST_validation_get_address_latency (const struct GNUNET_HELLO_Address *address);
75 struct Session *session);
76 74
77 75
78/** 76/**