- * Notify ATS about the a new inbound address. We may already
- * know the address (as this is called each time we receive
- * a message from an inbound connection). If the address is
- * indeed new, make it available to ATS.
+ * Reset address blocking time. Resets the exponential
+ * back-off timer for this address to zero. Called when
+ * an address was used to create a successful connection.
+ *
+ * @param address the address to reset the blocking timer
+ * @param session the session (can be NULL)
+ */
+void
+GST_ats_block_reset (const struct GNUNET_HELLO_Address *address,
+ struct GNUNET_ATS_Session *session)
+{
+ struct AddressInfo *ai;
+
+ if (0 ==
+ memcmp (&GST_my_identity,
+ &address->peer,
+ sizeof (struct GNUNET_PeerIdentity)))
+ return; /* our own, ignore! */
+ ai = find_ai (address, session);
+ if (NULL == ai)
+ {
+ GNUNET_break (0);
+ return;
+ }
+ /* address is in successful use, so it should not be blocked right now */
+ GNUNET_break (NULL == ai->unblock_task);
+ ai->back_off = GNUNET_TIME_UNIT_ZERO;
+}
+
+
+/**
+ * Notify ATS about a new inbound @a address. The @a address in
+ * combination with the @a session must be new, but this function will
+ * perform a santiy check. If the @a address is indeed new, make it
+ * available to ATS.