[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r30258 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r30258 - gnunet/src/mesh |
Date: |
Thu, 17 Oct 2013 16:41:13 +0200 |
Author: bartpolot
Date: 2013-10-17 16:41:13 +0200 (Thu, 17 Oct 2013)
New Revision: 30258
Modified:
gnunet/src/mesh/gnunet-service-mesh_connection.c
gnunet/src/mesh/gnunet-service-mesh_tunnel.c
gnunet/src/mesh/mesh_common.c
Log:
- unify payload, fixes
Modified: gnunet/src/mesh/gnunet-service-mesh_connection.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_connection.c 2013-10-17 14:01:45 UTC
(rev 30257)
+++ gnunet/src/mesh/gnunet-service-mesh_connection.c 2013-10-17 14:41:13 UTC
(rev 30258)
@@ -354,7 +354,7 @@
/**
* Callback called when a queued message is sent.
*
- * Calculates the average time
+ * Calculates the average time and connection packet tracking.
*
* @param cls Closure.
* @param c Connection this message was on.
@@ -373,8 +373,29 @@
struct MeshFlowControl *fc;
double usecsperbyte;
+ fc = fwd ? &c->fwd_fc : &c->bck_fc;
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "! Q_N- %p %u\n", fc, fc->queue_n);
+ fc->queue_n--;
+ c->pending_messages--;
+ if (GNUNET_YES == c->destroy && 0 == c->pending_messages)
+ {
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "! destroying connection!\n");
+ GMC_destroy (c);
+ }
+ /* Send ACK if needed, after accounting for sent ID in fc->queue_n */
+ switch (type)
+ {
+ case GNUNET_MESSAGE_TYPE_MESH_ENCRYPTED:
+ fc->last_pid_sent++;
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "! accounting pid %u\n",
fc->last_pid_sent);
+// send_ack (c, ch, fwd);
+ break;
+ default:
+ break;
+ }
+
if (NULL == c->perf)
- return; /* Only endpoints are interested in this. */
+ return; /* Only endpoints are interested in timing. */
LOG (GNUNET_ERROR_TYPE_DEBUG, "! message sent!\n");
p = c->perf;
@@ -397,26 +418,6 @@
}
p->idx = (p->idx + 1) % AVG_MSGS;
- fc = fwd ? &c->fwd_fc : &c->bck_fc;
- LOG (GNUNET_ERROR_TYPE_DEBUG, "! Q_N- %p %u\n", fc, fc->queue_n);
- fc->queue_n--;
- c->pending_messages--;
- if (GNUNET_YES == c->destroy && 0 == c->pending_messages)
- {
- LOG (GNUNET_ERROR_TYPE_DEBUG, "! destroying connection!\n");
- GMC_destroy (c);
- }
- /* Send ACK if needed, after accounting for sent ID in fc->queue_n */
- switch (type)
- {
- case GNUNET_MESSAGE_TYPE_MESH_ENCRYPTED:
- fc->last_pid_sent++;
- LOG (GNUNET_ERROR_TYPE_DEBUG, "! accounting pid %u\n",
fc->last_pid_sent);
-// send_ack (c, ch, fwd);
- break;
- default:
- break;
- }
// if (NULL != c->t)
// {
// c->t->pending_messages--;
Modified: gnunet/src/mesh/gnunet-service-mesh_tunnel.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_tunnel.c 2013-10-17 14:01:45 UTC
(rev 30257)
+++ gnunet/src/mesh/gnunet-service-mesh_tunnel.c 2013-10-17 14:41:13 UTC
(rev 30258)
@@ -1199,7 +1199,7 @@
type = ntohs (message->type);
switch (type)
{
- case GNUNET_MESSAGE_TYPE_MESH_ENCRYPTED:
+ case GNUNET_MESSAGE_TYPE_MESH_DATA:
case GNUNET_MESSAGE_TYPE_MESH_CHANNEL_CREATE:
case GNUNET_MESSAGE_TYPE_MESH_CHANNEL_DESTROY:
case GNUNET_MESSAGE_TYPE_MESH_CHANNEL_ACK:
Modified: gnunet/src/mesh/mesh_common.c
===================================================================
--- gnunet/src/mesh/mesh_common.c 2013-10-17 14:01:45 UTC (rev 30257)
+++ gnunet/src/mesh/mesh_common.c 2013-10-17 14:41:13 UTC (rev 30258)
@@ -83,20 +83,20 @@
/**
* Transport data in the mesh (origin->end) unicast
*/
- case 260: return "GNUNET_MESSAGE_TYPE_MESH_UNICAST";
+ case 260: return "GNUNET_MESSAGE_TYPE_MESH_DATA";
/**
- * Transport data back in the mesh (end->origin)
+ * Transport data back in the mesh (end->origin) FIXME
*/
case 262: return "GNUNET_MESSAGE_TYPE_MESH_TO_ORIGIN";
/**
- * Send origin an ACK that UNICAST arrived
+ * Send origin an ACK that UNICAST arrived FIXME
*/
case 263: return "GNUNET_MESSAGE_TYPE_MESH_UNICAST_ACK";
/**
- * Send origin an ACK that TO_ORIGIN arrived
+ * Send origin an ACK that TO_ORIGIN arrived FIXME
*/
case 264: return "GNUNET_MESSAGE_TYPE_MESH_TO_ORIG_ACK";
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r30258 - gnunet/src/mesh,
gnunet <=