From: Christian Grothoff Date: Tue, 14 Jun 2011 09:59:35 +0000 (+0000) Subject: ifdebug X-Git-Tag: initial-import-from-subversion-38251~18235 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=fe5d399299c46ba51f3d2d7638185d10ab07a91f;p=oweals%2Fgnunet.git ifdebug --- 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;