#include "gnunet_scheduler_lib.h"
#include "gnunet_server_lib.h"
-#define DEBUG_CONNECTION GNUNET_NO
+#define DEBUG_CONNECTION GNUNET_EXTRA_LOGGING
+
+#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
+
+#define LOG_STRERROR(kind,syscall) GNUNET_log_from_strerror (kind, "util", syscall)
/**
* Possible functions to call after connect failed or succeeded.
GNUNET_NETWORK_socket_accept (lsock, (struct sockaddr *) &addr, &addrlen);
if (NULL == sock)
{
- GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "accept");
+ LOG_STRERROR (GNUNET_ERROR_TYPE_WARNING, "accept");
return NULL;
}
if ((addrlen > sizeof (addr)) || (addrlen < sizeof (sa_family_t)))
(GNUNET_YES != (aret = access (access_cls, gcp, uaddr, addrlen))))
{
if (aret == GNUNET_NO)
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Access denied to `%s'\n"),
- GNUNET_a2s (uaddr, addrlen));
+ LOG (GNUNET_ERROR_TYPE_INFO, _("Access denied to `%s'\n"),
+ GNUNET_a2s (uaddr, addrlen));
GNUNET_break (GNUNET_OK ==
GNUNET_NETWORK_socket_shutdown (sock, SHUT_RDWR));
GNUNET_break (GNUNET_OK == GNUNET_NETWORK_socket_close (sock));
ret->addrlen = addrlen;
ret->sock = sock;
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Accepting connection from `%s': %p\n"),
- GNUNET_a2s (uaddr, addrlen), ret);
+ LOG (GNUNET_ERROR_TYPE_INFO, _("Accepting connection from `%s': %p\n"),
+ GNUNET_a2s (uaddr, addrlen), ret);
#endif
return ret;
}
if (0 != (sock->ccs & COCO_TRANSMIT_READY))
{
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Destroy waits for CCS-TR to be done (%p)\n", sock);
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Destroy waits for CCS-TR to be done (%p)\n",
+ sock);
#endif
sock->ccs |= COCO_DESTROY_CONTINUATION;
return;
if (sock->write_task != GNUNET_SCHEDULER_NO_TASK)
{
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Destroy waits for write_task to be done (%p)\n", sock);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Destroy waits for write_task to be done (%p)\n", sock);
#endif
GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == sock->destroy_task);
sock->destroy_task =
if (sock->sock != NULL)
{
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutting down socket (%p)\n", sock);
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Shutting down socket (%p)\n", sock);
#endif
if (sock->persist != GNUNET_YES)
{
if ((GNUNET_YES != GNUNET_NETWORK_socket_shutdown (sock->sock, SHUT_RDWR))
&& (errno != ENOTCONN) && (errno != ECONNRESET))
- GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "shutdown");
+ LOG_STRERROR (GNUNET_ERROR_TYPE_WARNING, "shutdown");
}
}
if (sock->read_task != GNUNET_SCHEDULER_NO_TASK)
return;
}
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Destroy actually runs (%p)!\n", sock);
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Destroy actually runs (%p)!\n", sock);
#endif
while (NULL != (pos = sock->ap_head))
{
GNUNET_free_non_null (sock->hostname);
GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == sock->destroy_task);
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Freeing memory of connection %p.\n",
- sock);
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Freeing memory of connection %p.\n", sock);
#endif
GNUNET_free (sock->write_buffer);
GNUNET_free (sock);
connect_fail_continuation (struct GNUNET_CONNECTION_Handle *h)
{
#if DEBUG_CONNECTION
- 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);
+ 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);
#endif
/* connect failed / timed out */
GNUNET_break (h->ap_head == NULL);
if (0 != (h->ccs & COCO_RECEIVE_AGAIN))
{
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "connect_fail_continuation triggers receive_again (%p)\n", h);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "connect_fail_continuation triggers receive_again (%p)\n", h);
#endif
h->ccs -= COCO_RECEIVE_AGAIN;
h->read_task = GNUNET_SCHEDULER_add_now (&receive_again, h);
if (0 != (h->ccs & COCO_TRANSMIT_READY))
{
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "connect_fail_continuation cancels timeout_task, triggers transmit_ready (%p)\n",
- h);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "connect_fail_continuation cancels timeout_task, triggers transmit_ready (%p)\n",
+ h);
#endif
GNUNET_assert (h->nth.timeout_task != GNUNET_SCHEDULER_NO_TASK);
GNUNET_SCHEDULER_cancel (h->nth.timeout_task);
if (0 != (h->ccs & COCO_DESTROY_CONTINUATION))
{
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "connect_fail_continuation runs destroy_continuation (%p)\n",
- h);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "connect_fail_continuation runs destroy_continuation (%p)\n", h);
#endif
h->ccs -= COCO_DESTROY_CONTINUATION;
GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == h->destroy_task);
connect_success_continuation (struct GNUNET_CONNECTION_Handle *h)
{
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connection to `%s' succeeded! (%p)\n",
- GNUNET_a2s (h->addr, h->addrlen), h);
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Connection to `%s' succeeded! (%p)\n",
+ GNUNET_a2s (h->addr, h->addrlen), h);
#endif
/* trigger jobs that waited for the connection */
if (0 != (h->ccs & COCO_RECEIVE_AGAIN))
{
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "connect_success_continuation runs receive_again (%p)\n", h);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "connect_success_continuation runs receive_again (%p)\n", h);
#endif
h->ccs -= COCO_RECEIVE_AGAIN;
h->read_task = GNUNET_SCHEDULER_add_now (&receive_again, h);
if (0 != (h->ccs & COCO_TRANSMIT_READY))
{
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "connect_success_continuation runs transmit_ready, cancels timeout_task (%p)\n",
- h);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "connect_success_continuation runs transmit_ready, cancels timeout_task (%p)\n",
+ h);
#endif
GNUNET_assert (h->nth.timeout_task != GNUNET_SCHEDULER_NO_TASK);
GNUNET_SCHEDULER_cancel (h->nth.timeout_task);
if (0 != (h->ccs & COCO_DESTROY_CONTINUATION))
{
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "connect_success_continuation runs destroy_continuation (%p)\n",
- h);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "connect_success_continuation runs destroy_continuation (%p)\n", h);
#endif
h->ccs -= COCO_DESTROY_CONTINUATION;
GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == h->destroy_task);
if (addr == NULL)
{
h->dns_active = NULL;
- if (NULL == h->ap_head)
+ if ((NULL == h->ap_head) && (NULL == h->sock))
connect_fail_continuation (h);
return;
}
GNUNET_assert (h->addr == NULL);
/* try to connect */
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Trying to connect using address `%s:%u/%s:%u'\n", h->hostname,
- h->port, GNUNET_a2s (addr, addrlen), h->port);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Trying to connect using address `%s:%u/%s:%u'\n", h->hostname, h->port,
+ GNUNET_a2s (addr, addrlen), h->port);
#endif
ap = GNUNET_malloc (sizeof (struct AddressProbe) + addrlen);
ap->addr = (const struct sockaddr *) &ap[1];
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);
+ 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)) &&
(errno != EINPROGRESS))
{
/* maybe refused / unsupported address, try next */
- GNUNET_log_strerror (GNUNET_ERROR_TYPE_INFO, "connect");
+ LOG_STRERROR (GNUNET_ERROR_TYPE_INFO, "connect");
#if 0
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- _("Failed to connect to `%s' (%p)\n"),
- GNUNET_a2s (ap->addr, ap->addrlen), h);
+ LOG (GNUNET_ERROR_TYPE_INFO, _("Failed to connect to `%s' (%p)\n"),
+ GNUNET_a2s (ap->addr, ap->addrlen), h);
#endif
GNUNET_break (GNUNET_OK == GNUNET_NETWORK_socket_close (ap->sock));
GNUNET_free (ap);
s = GNUNET_NETWORK_socket_create (af_family, SOCK_STREAM, 0);
if (s == NULL)
{
- GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING | GNUNET_ERROR_TYPE_BULK,
- "socket");
+ LOG_STRERROR (GNUNET_ERROR_TYPE_WARNING | GNUNET_ERROR_TYPE_BULK, "socket");
return NULL;
}
if ((GNUNET_OK != GNUNET_NETWORK_socket_connect (s, serv_addr, addrlen)) &&
(errno != EINPROGRESS))
{
/* maybe refused / unsupported address, try next */
- GNUNET_log_strerror (GNUNET_ERROR_TYPE_INFO, "connect");
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- _("Attempt to connect to `%s' failed\n"), GNUNET_a2s (serv_addr,
- addrlen));
+ LOG_STRERROR (GNUNET_ERROR_TYPE_INFO, "connect");
+ LOG (GNUNET_ERROR_TYPE_INFO, _("Attempt to connect to `%s' failed\n"),
+ GNUNET_a2s (serv_addr, addrlen));
GNUNET_break (GNUNET_OK == GNUNET_NETWORK_socket_close (s));
return NULL;
}
memcpy (ret->addr, serv_addr, addrlen);
ret->addrlen = addrlen;
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Trying to connect to `%s' (%p)\n"),
- GNUNET_a2s (serv_addr, addrlen), ret);
+ LOG (GNUNET_ERROR_TYPE_INFO, _("Trying to connect to `%s' (%p)\n"),
+ GNUNET_a2s (serv_addr, addrlen), ret);
#endif
return ret;
}
GNUNET_CONNECTION_Receiver receiver;
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Network signals time out to receiver (%p)!\n", sh);
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Network signals time out to receiver (%p)!\n",
+ sh);
#endif
GNUNET_assert (NULL != (receiver = sh->receiver));
sh->receiver = NULL;
{
/* ignore shutdown request, go again immediately */
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Ignoring shutdown signal per configuration\n");
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Ignoring shutdown signal per configuration\n");
#endif
sh->read_task =
GNUNET_SCHEDULER_add_read_net (GNUNET_TIME_absolute_get_remaining
{
#if DEBUG_CONNECTION
if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Receive from `%s' encounters error: time out by %llums... (%p)\n",
- GNUNET_a2s (sh->addr, sh->addrlen),
- GNUNET_TIME_absolute_get_duration (sh->receive_timeout).
- rel_value, sh);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Receive from `%s' encounters error: time out by %llums... (%p)\n",
+ GNUNET_a2s (sh->addr, sh->addrlen),
+ GNUNET_TIME_absolute_get_duration (sh->receive_timeout).rel_value,
+ sh);
#endif
signal_timeout (sh);
return;
{
/* connect failed for good */
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Receive encounters error, socket closed... (%p)\n", sh);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Receive encounters error, socket closed... (%p)\n", sh);
#endif
signal_error (sh, ECONNREFUSED);
return;
if (errno == EINTR)
goto RETRY;
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Error receiving: %s\n",
- STRERROR (errno));
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Error receiving: %s\n", STRERROR (errno));
#endif
signal_error (sh, errno);
return;
}
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "receive_ready read %u/%u bytes from `%s' (%p)!\n",
- (unsigned int) ret, sh->max, GNUNET_a2s (sh->addr, sh->addrlen),
- sh);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "receive_ready read %u/%u bytes from `%s' (%p)!\n", (unsigned int) ret,
+ sh->max, GNUNET_a2s (sh->addr, sh->addrlen), sh);
#endif
GNUNET_assert (NULL != (receiver = sh->receiver));
sh->receiver = NULL;
{
/* not connected and no longer trying */
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Receive encounters error, socket closed (%p)...\n", sh);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Receive encounters error, socket closed (%p)...\n", sh);
#endif
signal_error (sh, ECONNREFUSED);
return;
(0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)))
{
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Receive encounters error: time out (%p)...\n", sh);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Receive encounters error: time out (%p)...\n", sh);
#endif
signal_timeout (sh);
return;
GNUNET_CONNECTION_TransmitReadyNotify notify;
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "transmit_timeout running (%p)\n", sock);
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "transmit_timeout running (%p)\n", sock);
#endif
sock->nth.timeout_task = GNUNET_SCHEDULER_NO_TASK;
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Transmit to `%s:%u/%s' fails, time out reached (%p).\n",
- sock->hostname, sock->port, GNUNET_a2s (sock->addr,
- sock->addrlen), sock);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Transmit to `%s:%u/%s' fails, time out reached (%p).\n", sock->hostname,
+ sock->port, GNUNET_a2s (sock->addr, sock->addrlen), sock);
#endif
GNUNET_assert (0 != (sock->ccs & COCO_TRANSMIT_READY));
sock->ccs -= COCO_TRANSMIT_READY; /* remove request */
GNUNET_CONNECTION_TransmitReadyNotify notify;
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Transmission request of size %u fails (%s/%u), connection failed (%p).\n",
- sock->nth.notify_size, sock->hostname, sock->port, sock);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Transmission request of size %u fails (%s/%u), connection failed (%p).\n",
+ sock->nth.notify_size, sock->hostname, sock->port, sock);
#endif
sock->write_task = GNUNET_SCHEDULER_NO_TASK;
notify = sock->nth.notify_ready;
size_t have;
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "transmit_ready running (%p).\n", sock);
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "transmit_ready running (%p).\n", sock);
#endif
GNUNET_assert (sock->write_task != GNUNET_SCHEDULER_NO_TASK);
sock->write_task = GNUNET_SCHEDULER_NO_TASK;
GNUNET_assert (sock->nth.timeout_task == GNUNET_SCHEDULER_NO_TASK);
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
{
- if (sock->ignore_shutdown == GNUNET_YES)
+ if ((sock->ignore_shutdown == GNUNET_YES) && (NULL != sock->sock))
goto SCHEDULE_WRITE; /* ignore shutdown, go again immediately */
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Transmit to `%s' fails, shutdown happened (%p).\n",
- GNUNET_a2s (sock->addr, sock->addrlen), sock);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Transmit to `%s' fails, shutdown happened (%p).\n",
+ GNUNET_a2s (sock->addr, sock->addrlen), sock);
#endif
notify = sock->nth.notify_ready;
if (NULL != notify)
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_TIMEOUT))
{
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Transmit to `%s' fails, time out reached (%p).\n",
- GNUNET_a2s (sock->addr, sock->addrlen), sock);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Transmit to `%s' fails, time out reached (%p).\n",
+ GNUNET_a2s (sock->addr, sock->addrlen), sock);
#endif
notify = sock->nth.notify_ready;
GNUNET_assert (NULL != notify);
if (!GNUNET_NETWORK_fdset_isset (tc->write_ready, sock->sock))
{
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- _
- ("Could not satisfy pending transmission request, socket closed or connect failed (%p).\n"),
- sock);
+ LOG (GNUNET_ERROR_TYPE_INFO,
+ _
+ ("Could not satisfy pending transmission request, socket closed or connect failed (%p).\n"),
+ sock);
#endif
transmit_error (sock);
return; /* connect failed for good, we're finished */
#if 0
int en = errno;
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Failed to send to `%s': %s\n"),
- GNUNET_a2s (sock->addr, sock->addrlen), STRERROR (en));
+ LOG (GNUNET_ERROR_TYPE_ERROR, _("Failed to send to `%s': %s\n"),
+ GNUNET_a2s (sock->addr, sock->addrlen), STRERROR (en));
#endif
#if DEBUG_CONNECTION
- GNUNET_log_strerror (GNUNET_ERROR_TYPE_DEBUG, "send");
+ LOG_STRERROR (GNUNET_ERROR_TYPE_DEBUG, "send");
#endif
transmit_error (sock);
return;
}
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "transmit_ready transmitted %u/%u bytes to `%s' (%p)\n",
- (unsigned int) ret, have, GNUNET_a2s (sock->addr, sock->addrlen),
- sock);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "transmit_ready transmitted %u/%u bytes to `%s' (%p)\n",
+ (unsigned int) ret, have, GNUNET_a2s (sock->addr, sock->addrlen), sock);
#endif
sock->write_buffer_pos += ret;
if (sock->write_buffer_pos == sock->write_buffer_off)
/* not done writing, schedule more */
SCHEDULE_WRITE:
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Re-scheduling transmit_ready (more to do) (%p).\n", sock);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Re-scheduling transmit_ready (more to do) (%p).\n", sock);
#endif
have = sock->write_buffer_off - sock->write_buffer_pos;
GNUNET_assert ((sock->nth.notify_ready != NULL) || (have > 0));
if (sock->sock != NULL)
{
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Scheduling transmit_ready (%p).\n",
- sock);
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Scheduling transmit_ready (%p).\n", sock);
#endif
sock->write_task =
GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_absolute_get_remaining
else
{
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "CCS-Scheduling transmit_ready, adding timeout task (%p).\n",
- sock);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "CCS-Scheduling transmit_ready, adding timeout task (%p).\n", sock);
#endif
sock->ccs |= COCO_TRANSMIT_READY;
sock->nth.timeout_task =
if (0 != (th->sh->ccs & COCO_TRANSMIT_READY))
{
#if DEBUG_CONNECTION
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "notify_transmit_ready_cancel cancels timeout_task (%p)\n", th);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "notify_transmit_ready_cancel cancels timeout_task (%p)\n", th);
#endif
GNUNET_SCHEDULER_cancel (th->timeout_task);
th->timeout_task = GNUNET_SCHEDULER_NO_TASK;