+ old = find_address (peer, aa);
+ if (old == NULL)
+ {
+ GNUNET_assert (GNUNET_OK ==
+ GNUNET_CONTAINER_multihashmap_put (addresses,
+ &peer->hashPubKey,
+ aa,
+ GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE));
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Added new address for peer `%s' %X\n",
+ GNUNET_i2s (peer), aa);
+ return;
+ }
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Updated existing address for peer `%s' %X \n",
+ GNUNET_i2s (peer), old);
+ GNUNET_free_non_null (old->ats);
+ old->ats = NULL;
+ old->ats_count = 0;
+ old->ats = aa->ats;
+ old->ats_count = aa->ats_count;
+ GNUNET_free (aa->plugin);
+ GNUNET_free (aa);
+}
+
+
+static int
+remove_address_by_client (void *cls,
+ const GNUNET_HashCode * key,
+ void *value)
+{
+ struct GNUNET_SERVER_Client *client = cls;
+ struct ATS_Address * aa = value;