[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r24010 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r24010 - gnunet/src/mesh |
Date: |
Wed, 26 Sep 2012 11:38:46 +0200 |
Author: bartpolot
Date: 2012-09-26 11:38:46 +0200 (Wed, 26 Sep 2012)
New Revision: 24010
Modified:
gnunet/src/mesh/gnunet-service-mesh.c
Log:
- on queue destroy, eliminate the entry in the peer's children info circular
buffer
Modified: gnunet/src/mesh/gnunet-service-mesh.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh.c 2012-09-26 09:37:52 UTC (rev
24009)
+++ gnunet/src/mesh/gnunet-service-mesh.c 2012-09-26 09:38:46 UTC (rev
24010)
@@ -4572,6 +4572,10 @@
{
struct MeshTransmissionDescriptor *dd;
struct MeshPathInfo *path_info;
+ struct MeshTunnelChildInfo *cinfo;
+ struct GNUNET_PeerIdentity id;
+ unsigned int i;
+ unsigned int max;
if (GNUNET_YES == clear_cls)
{
@@ -4602,6 +4606,34 @@
GNUNET_CONTAINER_DLL_remove (queue->peer->queue_head,
queue->peer->queue_tail,
queue);
+
+ /* Delete from child_fc in the appropiate tunnel */
+ max = queue->tunnel->fwd_queue_max;
+ GNUNET_PEER_resolve (queue->peer->id, &id);
+ cinfo = tunnel_get_neighbor_fc (queue->tunnel, &id);
+ for (i = 0; i < cinfo->send_buffer_n; i++)
+ {
+ unsigned int i2;
+ i2 = (cinfo->send_buffer_start + i) % max;
+ if (cinfo->send_buffer[i2] == queue)
+ {
+ /* Found corresponding entry in the send_buffer. Move all others back. */
+ unsigned int j;
+ unsigned int j2;
+ unsigned int j3;
+
+ for (j = i; j < cinfo->send_buffer_n - 1; j++)
+ {
+ j2 = (cinfo->send_buffer_start + j) % max;
+ j3 = (cinfo->send_buffer_start + j + 1) % max;
+ cinfo->send_buffer[j2] = cinfo->send_buffer[j3];
+ }
+ cinfo->send_buffer[j3] = NULL;
+ cinfo->send_buffer_n--;
+ }
+ }
+ //queue->
+
GNUNET_free (queue);
}
@@ -7734,11 +7766,8 @@
while (NULL != q)
{
n = q->next;
- if (q->peer == pi)
- {
- /* try to reroute this traffic instead */
- queue_destroy(q, GNUNET_YES);
- }
+ /* TODO try to reroute this traffic instead */
+ queue_destroy(q, GNUNET_YES);
q = n;
}
peer_info_remove_path (pi, pi->id, myid);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r24010 - gnunet/src/mesh,
gnunet <=