[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r19637 - gnunet/src/transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r19637 - gnunet/src/transport |
Date: |
Thu, 2 Feb 2012 17:13:56 +0100 |
Author: wachs
Date: 2012-02-02 17:13:56 +0100 (Thu, 02 Feb 2012)
New Revision: 19637
Modified:
gnunet/src/transport/plugin_transport_udp_new.c
Log:
- changes
Modified: gnunet/src/transport/plugin_transport_udp_new.c
===================================================================
--- gnunet/src/transport/plugin_transport_udp_new.c 2012-02-02 16:11:13 UTC
(rev 19636)
+++ gnunet/src/transport/plugin_transport_udp_new.c 2012-02-02 16:13:56 UTC
(rev 19637)
@@ -109,7 +109,12 @@
*/
struct GNUNET_TIME_Absolute flow_delay_from_other_peer;
+ /**
+ * expected delay for ACKs
+ */
+ struct GNUNET_TIME_Relative last_expected_delay;
+
struct GNUNET_ATS_Information ats;
struct FragmentationContext * frag_ctx;
@@ -537,7 +542,7 @@
#endif
plugin->env->session_end (plugin->env->cls, &s->target, s);
- while (s->frag_ctx != NULL)
+ if (s->frag_ctx != NULL)
{
GNUNET_FRAGMENT_context_destroy(s->frag_ctx->frag);
GNUNET_free (s->frag_ctx);
@@ -654,6 +659,7 @@
s->sock_addr = (const struct sockaddr *) &s[1];
s->flow_delay_for_other_peer = GNUNET_TIME_relative_get_zero();
s->flow_delay_from_other_peer = GNUNET_TIME_absolute_get_zero();
+ s->last_expected_delay = GNUNET_TIME_UNIT_SECONDS;
return s;
}
@@ -911,7 +917,7 @@
frag_ctx->frag = GNUNET_FRAGMENT_context_create (plugin->env->stats,
UDP_MTU,
&plugin->tracker,
- plugin->last_expected_delay,
+ s->last_expected_delay,
&udp->header,
&enqueue_fragment,
frag_ctx);
@@ -1328,7 +1334,7 @@
(unsigned int) ntohs (msg->size), GNUNET_i2s (&udp_ack->sender),
GNUNET_a2s ((const struct sockaddr *) addr, fromlen));
#endif
- plugin->last_expected_delay = GNUNET_FRAGMENT_context_destroy
(s->frag_ctx->frag);
+ s->last_expected_delay = GNUNET_FRAGMENT_context_destroy (s->frag_ctx->frag);
struct UDPMessageWrapper * udpw = plugin->msg_head;
while (udpw!= NULL)
@@ -1513,7 +1519,9 @@
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Fragmented message for peer `%s'
with size %u timed out\n",
GNUNET_i2s(&udpw->session->target), udpw->frag_ctx->bytes_to_send);
#endif
- GNUNET_FRAGMENT_context_destroy(udpw->frag_ctx->frag);
+ udpw->session->last_expected_delay =
GNUNET_FRAGMENT_context_destroy(udpw->frag_ctx->frag);
+ GNUNET_free (udpw->frag_ctx);
+ udpw->session->frag_ctx = NULL;
}
else
{
@@ -1533,14 +1541,15 @@
if (delta.rel_value == 0)
{
/* this message is not delayed */
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Message is not delayed for %llu
\n",
- delta);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Message for peer `%s' (%u bytes)
is not delayed \n",
+ GNUNET_i2s(&udpw->session->target), udpw->msg_size);
break;
}
else
{
/* this message is delayed, try next */
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Message is delayed for %llu \n",
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Message for peer `%s' (%u bytes)
is delayed for %llu \n",
+ GNUNET_i2s(&udpw->session->target), udpw->msg_size,
delta);
udpw = udpw->next;
}
@@ -1917,7 +1926,6 @@
plugin->mst = GNUNET_SERVER_mst_create (&process_inbound_tokenized_messages,
plugin);
plugin->port = port;
plugin->aport = aport;
- plugin->last_expected_delay = GNUNET_TIME_UNIT_SECONDS;
plugin->broadcast_interval = interval;
plugin->enable_ipv6 = enable_v6;
plugin->env = env;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r19637 - gnunet/src/transport,
gnunet <=