[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r24401 - gnunet/src/transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r24401 - gnunet/src/transport |
Date: |
Thu, 18 Oct 2012 17:12:25 +0200 |
Author: wachs
Date: 2012-10-18 17:12:25 +0200 (Thu, 18 Oct 2012)
New Revision: 24401
Modified:
gnunet/src/transport/gnunet-service-transport_validation.c
gnunet/src/transport/plugin_transport_udp.c
Log:
preliminary workaround for 0002549
Modified: gnunet/src/transport/gnunet-service-transport_validation.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_validation.c 2012-10-18
14:52:25 UTC (rev 24400)
+++ gnunet/src/transport/gnunet-service-transport_validation.c 2012-10-18
15:12:25 UTC (rev 24401)
@@ -1150,10 +1150,11 @@
&ve->public_key))
{
GNUNET_break_op (0);
+ /*
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Invalid signature on address %s:%s from peer `%s'\n",
tname, GST_plugins_a2s (ve->address),
- GNUNET_i2s (sender));
+ GNUNET_i2s (sender));*/
return;
}
Modified: gnunet/src/transport/plugin_transport_udp.c
===================================================================
--- gnunet/src/transport/plugin_transport_udp.c 2012-10-18 14:52:25 UTC (rev
24400)
+++ gnunet/src/transport/plugin_transport_udp.c 2012-10-18 15:12:25 UTC (rev
24401)
@@ -288,6 +288,9 @@
* Bytes used to send all fragments on wire including UDP overhead
*/
size_t on_wire_size;
+
+ unsigned int fragments_used;
+ struct GNUNET_TIME_Relative exp_delay;
};
@@ -1408,6 +1411,7 @@
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Enqueuing fragment with %u bytes\n", msg_len);
+ frag_ctx->fragments_used ++;
udpw = GNUNET_malloc (sizeof (struct UDP_MessageWrapper) + msg_len);
udpw->session = frag_ctx->session;
udpw->msg_buf = (char *) &udpw[1];
@@ -1538,13 +1542,18 @@
frag_ctx->frag = GNUNET_FRAGMENT_context_create (plugin->env->stats,
UDP_MTU,
&plugin->tracker,
- s->last_expected_delay,
+ GNUNET_TIME_relative_max (s->last_expected_delay,
GNUNET_TIME_UNIT_SECONDS),
&udp->header,
&enqueue_fragment,
frag_ctx);
+
+ frag_ctx->exp_delay = s->last_expected_delay;
s->frag_ctx = frag_ctx;
GNUNET_STATISTICS_update (plugin->env->stats,
+ "# UDP, fragmented msgs, messages, pending",
+ 1, GNUNET_NO);
+ GNUNET_STATISTICS_update (plugin->env->stats,
"# UDP, fragmented msgs, messages, attempt",
1, GNUNET_NO);
GNUNET_STATISTICS_update (plugin->env->stats,
@@ -1963,7 +1972,15 @@
udpw = tmp;
}
}
-
+/*
+ LOG (GNUNET_ERROR_TYPE_ERROR,
+ "Fragmented message sent: fragments needed: %u , payload %u bytes, used
on wire %u bytes, overhead: %f, expected delay: %llu\n",
+ s->frag_ctx->fragments_used,
+ s->frag_ctx->payload_size,
+ s->frag_ctx->on_wire_size,
+ ((float) s->frag_ctx->on_wire_size) / s->frag_ctx->payload_size,
+ s->frag_ctx->exp_delay.rel_value);
+*/
dummy.msg_type = MSG_FRAGMENTED_COMPLETE;
dummy.msg_buf = NULL;
dummy.msg_size = s->frag_ctx->on_wire_size;
@@ -1971,6 +1988,10 @@
dummy.frag_ctx = s->frag_ctx;
dummy.session = s;
+ GNUNET_STATISTICS_update (plugin->env->stats,
+ "# UDP, fragmented msgs, messages, pending",
+ -1, GNUNET_NO);
+
call_continuation (&dummy, GNUNET_OK);
GNUNET_free (s->frag_ctx);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r24401 - gnunet/src/transport,
gnunet <=