- if (0 != memcmp (&address->peer, &p.id, sizeof (struct GNUNET_PeerIdentity)))
- {
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Suggestion with invalid peer id'\n");
- ret = 1;
- }
- else if (0 != strcmp (address->transport_name, test_addr.plugin))
- {
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Suggestion with invalid plugin'\n");
- ret = 1;
- }
- else if (address->address_length != test_addr.addr_len)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Suggestion with invalid address length'\n");
- ret = 1;
- }
- else if (0 != memcmp (address->address, test_addr.plugin, address->address_length))
- {
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Suggestion with invalid address'\n");
- ret = 1;
- }
- else
- {
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Callback for correct address `%s'\n",
- GNUNET_i2s (&address->peer));
- ret = 0;
- }
- GNUNET_ATS_suggest_address_cancel (sched_ats, &p.id);
- GNUNET_SCHEDULER_add_now (&end, NULL);