/*
This file is part of GNUnet.
- (C) 2009-2014 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2009-2014 Christian Grothoff (and other contributing authors)
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
if (NULL == msg)
{
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Disconnected from transport, address resolution failed\n");
alucb->cb (alucb->cb_cls,
NULL,
GNUNET_SYSERR);
- GNUNET_CLIENT_disconnect (alucb->client);
- GNUNET_free (alucb);
+ GNUNET_TRANSPORT_address_to_string_cancel (alucb);
return;
}
GNUNET_break (ntohs (msg->type) ==
alucb->cb (alucb->cb_cls,
NULL,
GNUNET_SYSERR);
- GNUNET_CLIENT_disconnect (alucb->client);
- GNUNET_free (alucb);
+ GNUNET_TRANSPORT_address_to_string_cancel (alucb);
return;
}
atsm = (const struct AddressToStringResultMessage *) msg;
{
/* expect more replies; as this is not the last
call, we must pass the empty string for the address */
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Address resolution failed\n");
alucb->cb (alucb->cb_cls,
"",
GNUNET_NO);
alucb->cb (alucb->cb_cls,
NULL,
GNUNET_OK);
- GNUNET_CLIENT_disconnect (alucb->client);
- GNUNET_free (alucb);
+ GNUNET_TRANSPORT_address_to_string_cancel (alucb);
return;
}
address = (const char *) &atsm[1];
alucb->cb (alucb->cb_cls,
NULL,
GNUNET_SYSERR);
- GNUNET_CLIENT_disconnect (alucb->client);
- GNUNET_free (alucb);
+ GNUNET_TRANSPORT_address_to_string_cancel (alucb);
return;
}
/* expect more replies */
}
client = GNUNET_CLIENT_connect ("transport", cfg);
if (NULL == client)
+ {
+ GNUNET_break (0);
return NULL;
+ }
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Client %p tries to resolve for peer `%s'address len %u \n",
+ "Client %p tries to resolve for peer `%s' address plugin %s len %u\n",
client,
GNUNET_i2s (&address->peer),
+ address->transport_name,
address->address_length);
msg = GNUNET_malloc (len);