From fd77112f5b46f75e4eb9bf155fb8052c0d79f77a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 7 Oct 2015 11:54:46 +0000 Subject: add additional diagnostics to help localize #3971 invariant violation --- src/transport/gnunet-service-transport_ats.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/transport/gnunet-service-transport_ats.c') 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, @@ -263,6 +263,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. -- cgit v1.2.3