[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r23636 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r23636 - gnunet/src/mesh |
Date: |
Tue, 4 Sep 2012 19:40:26 +0200 |
Author: bartpolot
Date: 2012-09-04 19:40:26 +0200 (Tue, 04 Sep 2012)
New Revision: 23636
Modified:
gnunet/src/mesh/gnunet-service-mesh.c
Log:
- correct update of tunnel queue for multicast messages
Modified: gnunet/src/mesh/gnunet-service-mesh.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh.c 2012-09-04 17:20:23 UTC (rev
23635)
+++ gnunet/src/mesh/gnunet-service-mesh.c 2012-09-04 17:40:26 UTC (rev
23636)
@@ -115,9 +115,12 @@
/** Tunnel it belongs to. */
struct MeshTunnel *t;
- /** How many remaining neighbors we need to send this to. */
+ /** How many remaining neighbors still hav't got it. */
unsigned int reference_counter;
+ /** How many remaining neighbors we need to send this to. */
+ unsigned int total_out;
+
/** Size of the data. */
size_t data_len;
@@ -2261,6 +2264,7 @@
}
info->mesh_data->data_len = size;
info->mesh_data->reference_counter = 1;
+ info->mesh_data->total_out = 1;
neighbor = peer_info_get (peer);
for (p = neighbor->path_head; NULL != p; p = p->next)
{
@@ -3337,6 +3341,10 @@
GNUNET_free (mdata);
t->fwd_queue_n--;
}
+ else
+ {
+ mdata->total_out = mdata->reference_counter;
+ }
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
" sending a multicast packet done\n");
return;
@@ -4672,9 +4680,17 @@
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "********* multicast\n");
{
struct MeshTransmissionDescriptor *info = queue->cls;
- if (info->mesh_data->reference_counter == 1)
+
+ if ((1 == info->mesh_data->reference_counter
+ && GNUNET_YES == t->speed_min)
+ ||
+ (info->mesh_data->total_out == info->mesh_data->reference_counter
+ && GNUNET_NO == t->speed_min))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "********* considered sent\n");
t->fwd_queue_n--;
- // FIXME fc (t->fwd_queue_n--)
+ }
}
data_size = send_core_data_multicast(queue->cls, size, buf);
tunnel_send_fwd_ack (t, GNUNET_MESSAGE_TYPE_MESH_MULTICAST);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r23636 - gnunet/src/mesh,
gnunet <=