- const struct GNUNET_MessageHeader *msg)
-{
- struct GNUNET_TRANSPORT_PeerAddressLookupContext *alucb = cls;
- const struct GNUNET_HELLO_Address *address;
- uint16_t size;
-
- if (msg == NULL)
- {
- alucb->cb (alucb->cb_cls, NULL);
- GNUNET_CLIENT_disconnect (alucb->client, GNUNET_NO);
- GNUNET_free (alucb);
- return;
- }
- GNUNET_break (ntohs (msg->type) ==
- GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_REPLY);
- size = ntohs (msg->size);
- if (size == sizeof (struct GNUNET_MessageHeader))
- {
- /* done! */
- alucb->cb (alucb->cb_cls, NULL );
- GNUNET_CLIENT_disconnect (alucb->client, GNUNET_NO);
- GNUNET_free (alucb);
- return;
- }
- address = (const struct GNUNET_HELLO_Address *) &msg[1];
-#if 0
- if (address[size - sizeof (struct GNUNET_MessageHeader) - 1] != '\0')
- {
- /* invalid reply */
- GNUNET_break (0);
- alucb->cb (alucb->cb_cls, NULL );
- GNUNET_CLIENT_disconnect (alucb->client, GNUNET_NO);
- GNUNET_free (alucb);
- return;
- }
-#endif
- /* expect more replies */
- GNUNET_CLIENT_receive (alucb->client, &peer_address_response_processor, alucb,
- GNUNET_TIME_absolute_get_remaining (alucb->timeout));
-
- /* REFACTOR FIX THIS */
- alucb->cb (alucb->cb_cls, address );
-}