From fe5d399299c46ba51f3d2d7638185d10ab07a91f Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 14 Jun 2011 09:59:35 +0000 Subject: [PATCH] ifdebug --- src/util/client.c | 3 ++- src/util/connection.c | 8 ++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/util/client.c b/src/util/client.c index 6c6db02fe..65f6dbc77 100644 --- a/src/util/client.c +++ b/src/util/client.c @@ -831,10 +831,11 @@ client_notify (void *cls, size_t size, void *buf) return 0; } /* auto-retry */ +#if DEBUG_CLIENT GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Failed to connect to `%s', automatically trying again.\n", th->sock->service_name); - +#endif GNUNET_CONNECTION_destroy (th->sock->sock, GNUNET_NO); th->sock->sock = do_connect (th->sock->service_name, th->sock->cfg, diff --git a/src/util/connection.c b/src/util/connection.c index 28898ab18..dae049eeb 100644 --- a/src/util/connection.c +++ b/src/util/connection.c @@ -1420,17 +1420,13 @@ connect_error (void *cls, struct GNUNET_CONNECTION_Handle *sock = cls; GNUNET_CONNECTION_TransmitReadyNotify notify; +#if DEBUG_CONNECTION GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Transmission request of size %u fails (%d/%s/%u), connection failed (%p).\n", + "Transmission request of size %u fails (%s/%u), connection failed (%p).\n", sock->nth.notify_size, - (sock->sock != NULL) ? *(int*) sock->sock : -1, sock->hostname, sock->port, sock); -#if DEBUG_CONNECTION - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Transmission request of size %u fails, connection failed (%p).\n", - sock->nth.notify_size, sock); #endif sock->write_task = GNUNET_SCHEDULER_NO_TASK; notify = sock->nth.notify_ready; -- 2.25.1