- static int counter = 0;
- if (NULL != address)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received callback for peer `%s'\n",
- GNUNET_i2s (&address->peer));
- if (0 < counter)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Too many callbacks!\n");
- ret = 1;
- }
- else if ((0 == memcmp (&address->peer, &p.id, sizeof (struct GNUNET_PeerIdentity))) &&
- (0 == strcmp (address->transport_name, test_addr.plugin)) &&
- (address->address_length == test_addr.addr_len) &&
- (0 == memcmp (address->address, test_addr.plugin, address->address_length)))
- {
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Callback for correct address `%s'\n",
- GNUNET_i2s (&address->peer));
- ret = 0;
- }
- counter ++;
- return;
- }
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received last callback, shutdown\n");
- GNUNET_SCHEDULER_add_now (&end, NULL);
+ die_task = GNUNET_SCHEDULER_NO_TASK;
+ end ( NULL, NULL);
+ ret = GNUNET_SYSERR;
+}
+
+static void
+address_suggest_cb (void *cls, const struct GNUNET_HELLO_Address *address,
+ struct Session *session,
+ struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
+ struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
+ const struct GNUNET_ATS_Information *atsi,
+ uint32_t ats_count)
+{
+