From 260d4269dd93fd8e4e5af766e15970251c5b7ac9 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 25 Jan 2015 21:08:22 +0000 Subject: -undo bad commit --- src/transport/gnunet-service-transport_ats.c | 34 +++++----------------------- 1 file changed, 6 insertions(+), 28 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 a660f252f..4fcf7c9dc 100644 --- a/src/transport/gnunet-service-transport_ats.c +++ b/src/transport/gnunet-service-transport_ats.c @@ -108,8 +108,6 @@ find_ai_cb (void *cls, fc->ret = ai; return GNUNET_NO; } - GNUNET_assert ( (fc->session != ai->session) || - (NULL == ai->session) ); return GNUNET_YES; } @@ -139,21 +137,6 @@ find_ai (const struct GNUNET_HELLO_Address *address, } -/** - * Test if ATS knows about this address. - * - * @param address the address - * @param session the session - * @return #GNUNET_YES if address is known, #GNUNET_NO if not. - */ -int -GST_ats_is_known (const struct GNUNET_HELLO_Address *address, - struct Session *session) -{ - return (NULL != find_ai (address, session)) ? GNUNET_YES : GNUNET_NO; -} - - /** * Notify ATS about the new address including the network this address is * located in. @@ -200,7 +183,7 @@ GST_ats_add_address (const struct GNUNET_HELLO_Address *address, if (NULL == (papi = GST_plugins_find (address->transport_name))) { /* we don't have the plugin for this address */ - GNUNET_assert (0); + GNUNET_break(0); return; } if (NULL != session) @@ -261,12 +244,7 @@ GST_ats_new_session (const struct GNUNET_HELLO_Address *address, ai = find_ai (address, NULL); if (NULL == ai) { - /* We may already be aware of the session, even if some other part - of the code could not tell if it just created a new session or - just got one recycled from the plugin; hence, we may be called - with "new" session even for an "old" session; in that case, - check that this is the case, but just ignore it. */ - GNUNET_assert (NULL != (find_ai (address, session))); + GNUNET_break (NULL != (find_ai (address, session))); return; } GNUNET_break (NULL == ai->session); @@ -352,9 +330,9 @@ GST_ats_update_metrics (const struct GNUNET_HELLO_Address *address, and if we get metrics for those, they were never known to ATS which means we end up here (however, in this case, the address must be an outbound address). */ - GNUNET_assert (GNUNET_YES != - GNUNET_HELLO_address_check_option (address, - GNUNET_HELLO_ADDRESS_INFO_INBOUND)); + GNUNET_break (GNUNET_YES != + GNUNET_HELLO_address_check_option (address, + GNUNET_HELLO_ADDRESS_INFO_INBOUND)); return; } @@ -416,7 +394,7 @@ GST_ats_expire_address (const struct GNUNET_HELLO_Address *address) ai = find_ai (address, NULL); if (NULL == ai) { - GNUNET_assert (0); + GNUNET_break (0); return; } GNUNET_assert (GNUNET_YES == -- cgit v1.2.3