summaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport_ats.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-10-07 11:54:46 +0000
committerChristian Grothoff <christian@grothoff.org>2015-10-07 11:54:46 +0000
commitfd77112f5b46f75e4eb9bf155fb8052c0d79f77a (patch)
tree9808e06ede4d1d7bba0aeabd4a79d6e175da563e /src/transport/gnunet-service-transport_ats.c
parent4855e879c0203915789e4e49f6b6a658150a6626 (diff)
add additional diagnostics to help localize #3971 invariant violation
Diffstat (limited to 'src/transport/gnunet-service-transport_ats.c')
-rw-r--r--src/transport/gnunet-service-transport_ats.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/transport/gnunet-service-transport_ats.c b/src/transport/gnunet-service-transport_ats.c
index 55b5e20a1..74658822e 100644
--- a/src/transport/gnunet-service-transport_ats.c
+++ b/src/transport/gnunet-service-transport_ats.c
@@ -249,11 +249,11 @@ find_ai_no_session (const struct GNUNET_HELLO_Address *address)
/**
- * Test if ATS knows about this address.
+ * Test if ATS knows about this @a address and @a session.
*
* @param address the address
* @param session the session
- * @return #GNUNET_YES if address is known, #GNUNET_NO if not.
+ * @return #GNUNET_YES if @a address is known, #GNUNET_NO if not.
*/
int
GST_ats_is_known (const struct GNUNET_HELLO_Address *address,
@@ -264,6 +264,19 @@ GST_ats_is_known (const struct GNUNET_HELLO_Address *address,
/**
+ * Test if ATS knows about this @a address.
+ *
+ * @param address the address
+ * @return #GNUNET_YES if @a address is known, #GNUNET_NO if not.
+ */
+int
+GST_ats_is_known_no_session (const struct GNUNET_HELLO_Address *address)
+{
+ return (NULL != find_ai_no_session (address)) ? GNUNET_YES : GNUNET_NO;
+}
+
+
+/**
* The blocking time for an address has expired, allow ATS to
* suggest it again.
*