From b0ce9b9445b4462384e7bd1dd97c6cdc153dbf56 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Fri, 8 Jun 2012 13:19:21 +0000 Subject: [PATCH] - remove old queue code --- src/mesh/gnunet-service-mesh_new.c | 56 +----------------------------- 1 file changed, 1 insertion(+), 55 deletions(-) diff --git a/src/mesh/gnunet-service-mesh_new.c b/src/mesh/gnunet-service-mesh_new.c index fd9178b8a..f0efc11f4 100644 --- a/src/mesh/gnunet-service-mesh_new.c +++ b/src/mesh/gnunet-service-mesh_new.c @@ -228,43 +228,6 @@ struct MeshPeerInfo }; -/** - * Data scheduled to transmit (to local client or remote peer) - */ -struct MeshQueue -{ - /** - * Double linked list - */ - struct MeshQueue *next; - struct MeshQueue *prev; - - /** - * Target of the data (NULL if target is client) - */ - struct MeshPeerInfo *peer; - - /** - * Client to send the data to (NULL if target is peer) - */ - struct MeshClient *client; - - /** - * Size of the message to transmit - */ - unsigned int size; - - /** - * How old is the data? - */ - struct GNUNET_TIME_Absolute timestamp; - - /** - * Data itself - */ - struct GNUNET_MessageHeader *data; -}; - /** * Globally unique tunnel identification (owner + number) * DO NOT USE OVER THE NETWORK @@ -363,12 +326,6 @@ struct MeshTunnel */ unsigned int nignore; - /** - * Messages ready to transmit - */ - struct MeshQueue *queue_head; - struct MeshQueue *queue_tail; - /** * Tunnel paths */ @@ -2339,8 +2296,6 @@ static int tunnel_destroy (struct MeshTunnel *t) { struct MeshClient *c; - struct MeshQueue *q; - struct MeshQueue *qn; GNUNET_HashCode hash; unsigned int i; int r; @@ -2409,16 +2364,7 @@ tunnel_destroy (struct MeshTunnel *t) t); GNUNET_CONTAINER_multihashmap_destroy (t->peers); } - q = t->queue_head; - while (NULL != q) - { - if (NULL != q->data) - GNUNET_free (q->data); - qn = q->next; - GNUNET_free (q); - q = qn; - /* TODO cancel core transmit ready in case it was active */ - } + tree_destroy (t->tree); if (NULL != t->dht_get_type) GNUNET_DHT_get_stop (t->dht_get_type); -- 2.25.1