struct GNUNET_TRANSPORT_ATS_Information * ats;
};
+
static struct GNUNET_CONTAINER_MultiHashMap * addresses;
struct ATS_Address * result;
};
-int compare_address_it (void *cls,
- const GNUNET_HashCode * key,
- void *value)
+
+static int
+compare_address_it (void *cls,
+ const GNUNET_HashCode * key,
+ void *value)
{
struct CompareAddressContext * cac = cls;
struct ATS_Address * aa = (struct ATS_Address *) value;
{
struct ATS_Address * aa;
+ /* FIXME: should test first if address already exists! */
aa = GNUNET_malloc (sizeof (struct ATS_Address) +
atsi_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information) +
plugin_addr_len);
uint32_t session_id)
{
#if 0
- // struct AddressDestroyedMessage * msg = (struct AddressDestroyedMessage *) message;
-/*
- struct GNUNET_PeerIdentity *peer = &msg->peer;
- struct ATS_Address * aa = find_address_by_addr (peer);
- GNUNET_CONTAINER_multihashmap_remove(addresses, peer, aa);
- GNUNET_free (aa);*/
+ struct ATS_Address * aa;
+
+ aa = find_address (peer, plugin_name, plugin_addr, plugin_addr_len,
+ session_client, session_id);
+ GNUNET_break (GNUNET_YES ==
+ GNUNET_CONTAINER_multihashmap_remove(addresses, &peer->hashPubKey, aa));
+ GNUNET_free (aa);
#endif
}