You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
*/
/**
* @file transport/gnunet-service-transport_ats.h
/**
- * 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,
}
+/**
+ * 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.
GNUNET_HELLO_ADDRESS_INFO_INBOUND));
ai = find_ai_no_session (address);
GNUNET_assert (NULL == ai);
+ GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != prop->scope);
LOG (GNUNET_ERROR_TYPE_INFO,
"Notifying ATS about peer `%s''s new address `%s'\n",
GNUNET_i2s (&address->peer),
if (NULL != ai->session)
{
ai->expired = GNUNET_YES;
- GNUNET_ATS_address_destroy (ai->ar);
- ai->ar = NULL;
+ if (NULL != ai->ar)
+ {
+ GNUNET_ATS_address_destroy (ai->ar);
+ ai->ar = NULL;
+ }
return;
}
GNUNET_assert (GNUNET_YES ==