From: Christian Grothoff Date: Fri, 13 Nov 2009 20:27:21 +0000 (+0000) Subject: fix X-Git-Tag: initial-import-from-subversion-38251~23094 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ea64814d5539c3543e455c9018658de4b199ec47;p=oweals%2Fgnunet.git fix --- diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c index 24803f9c7..e50ee49ad 100644 --- a/src/transport/transport_api.c +++ b/src/transport/transport_api.c @@ -617,6 +617,12 @@ schedule_control_transmit (struct GNUNET_TRANSPORT_Handle *h, { struct GNUNET_TRANSPORT_TransmitHandle *th; +#if DEBUG_TRANSPORT + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Control transmit of %u bytes within %llums requested\n", + size, + (unsigned long long) timeout.value); +#endif th = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_TransmitHandle)); th->handle = h; th->notify = notify; @@ -996,8 +1002,9 @@ request_connect (void *cls, size_t size, void *buf) } #if DEBUG_TRANSPORT GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Transmitting `%s' message for `%4s'.\n", - "TRY_CONNECT", GNUNET_i2s (&th->target)); + "Transmitting `%s' message for `%4s' (need connection in %llu ms).\n", + "TRY_CONNECT", GNUNET_i2s (&th->target), + GNUNET_TIME_absolute_get_remaining (th->timeout).value); #endif GNUNET_assert (size >= sizeof (struct TryConnectMessage)); tcm = buf; @@ -1101,6 +1108,9 @@ remove_neighbour (struct GNUNET_TRANSPORT_Handle *h, if (GNUNET_TIME_absolute_get_remaining (th->timeout).value <= CONNECT_RETRY_TIMEOUT.value) { /* signal error */ + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + _("Connection with `%4s' failed and timeout was in the past, giving up on message delivery.\n"), + GNUNET_i2s (peer)); GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == th->notify_delay_task); peer_transmit_timeout (th, NULL); } @@ -1919,7 +1929,7 @@ GNUNET_TRANSPORT_notify_transmit_ready (struct GNUNET_TRANSPORT_Handle #endif th->notify_delay_task = GNUNET_SCHEDULER_add_now (handle->sched, - &peer_transmit_timeout, th); + &transmit_ready, th); return th; }