summaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport_ats.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-01-25 21:08:22 +0000
committerChristian Grothoff <christian@grothoff.org>2015-01-25 21:08:22 +0000
commit260d4269dd93fd8e4e5af766e15970251c5b7ac9 (patch)
tree6b2b7ac3e1ba4224791518a38276efdd9729bb65 /src/transport/gnunet-service-transport_ats.c
parentee266d0bd0b96c67ac1c7f76fff41980bb181e64 (diff)
-undo bad commit
Diffstat (limited to 'src/transport/gnunet-service-transport_ats.c')
-rw-r--r--src/transport/gnunet-service-transport_ats.c34
1 files changed, 6 insertions, 28 deletions
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;
}
@@ -140,21 +138,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 ==