static void
connect_fail_continuation (struct GNUNET_CONNECTION_Handle *h)
{
-#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Failed to establish TCP connection to `%s:%u', no further addresses to try (%p).\n",
- h->hostname, h->port, h);
-#endif
+ GNUNET_log ((0 != strncmp (h->hostname,
+ "localhost:",
+ 10))
+ ? GNUNET_ERROR_TYPE_INFO
+ : GNUNET_ERROR_TYPE_WARNING,
+ _("Failed to establish TCP connection to `%s:%u', no further addresses to try.\n"),
+ h->hostname, h->port);
+ system ("netstat -ntpl");
/* connect failed / timed out */
GNUNET_break (h->ap_head == NULL);
GNUNET_break (h->ap_tail == NULL);
{
#if DEBUG_CONNECTION
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "connect_timeout_continuation triggers receive_again (%p)\n",
+ "connect_fail_continuation triggers receive_again (%p)\n",
h);
#endif
h->ccs -= COCO_RECEIVE_AGAIN;
{
#if DEBUG_CONNECTION
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "connect_timeout_continuation cancels timeout_task, triggers transmit_ready (%p)\n",
+ "connect_fail_continuation cancels timeout_task, triggers transmit_ready (%p)\n",
h);
#endif
GNUNET_assert (h->nth.timeout_task != GNUNET_SCHEDULER_NO_TASK);
{
#if DEBUG_CONNECTION
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "connect_timeout_continuation runs destroy_continuation (%p)\n",
+ "connect_fail_continuation runs destroy_continuation (%p)\n",
h);
#endif
h->ccs -= COCO_DESTROY_CONTINUATION;
GNUNET_free (ap);
return; /* not supported by OS */
}
-#if DEBUG_CONNECTION
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
_("Trying to connect to `%s' (%p)\n"),
GNUNET_a2s (ap->addr, ap->addrlen), h);
-#endif
if ((GNUNET_OK != GNUNET_NETWORK_socket_connect (ap->sock,
ap->addr,
ap->addrlen)) &&