aboutsummaryrefslogtreecommitdiff
path: root/src/mesh
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2013-02-14 00:38:11 +0000
committerBart Polot <bart@net.in.tum.de>2013-02-14 00:38:11 +0000
commitbb86330651d56cfcc117be79f662a2c70009e9b1 (patch)
tree84612540e6b98ededd877456860680057c8025c1 /src/mesh
parentfdf868ccfe16df9b8cd2f2fa892a9a6c8a846bb6 (diff)
downloadgnunet-bb86330651d56cfcc117be79f662a2c70009e9b1.tar.gz
gnunet-bb86330651d56cfcc117be79f662a2c70009e9b1.zip
- not needed size of t->peers should suffice
Diffstat (limited to 'src/mesh')
-rw-r--r--src/mesh/gnunet-service-mesh.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c
index 15e002b46..2525793af 100644
--- a/src/mesh/gnunet-service-mesh.c
+++ b/src/mesh/gnunet-service-mesh.c
@@ -440,10 +440,10 @@ struct MeshTunnel
440 */ 440 */
441 uint32_t last_fwd_ack; 441 uint32_t last_fwd_ack;
442 442
443 /** 443 /**
444 * BCK ACK value received from the hop towards the owner of the tunnel, 444 * BCK ACK value received from the hop towards the owner of the tunnel,
445 * (previous node / owner): up to what message PID can we sent back to him. 445 * (previous node / owner): up to what message PID can we sent back to him.
446 */ 446 */
447 uint32_t bck_ack; 447 uint32_t bck_ack;
448 448
449 /** 449 /**
@@ -488,11 +488,6 @@ struct MeshTunnel
488 unsigned int peers_ready; 488 unsigned int peers_ready;
489 489
490 /** 490 /**
491 * Number of peers that have been added to the tunnel
492 */
493 unsigned int peers_total;
494
495 /**
496 * Client owner of the tunnel, if any 491 * Client owner of the tunnel, if any
497 */ 492 */
498 struct MeshClient *owner; 493 struct MeshClient *owner;
@@ -3035,7 +3030,6 @@ tunnel_add_peer (struct MeshTunnel *t, struct MeshPeerInfo *peer)
3035 if (GNUNET_NO == 3030 if (GNUNET_NO ==
3036 GNUNET_CONTAINER_multihashmap_contains (t->peers, &id.hashPubKey)) 3031 GNUNET_CONTAINER_multihashmap_contains (t->peers, &id.hashPubKey))
3037 { 3032 {
3038 t->peers_total++;
3039 GNUNET_array_append (peer->tunnels, peer->ntunnels, t); 3033 GNUNET_array_append (peer->tunnels, peer->ntunnels, t);
3040 GNUNET_assert (GNUNET_OK == 3034 GNUNET_assert (GNUNET_OK ==
3041 GNUNET_CONTAINER_multihashmap_put (t->peers, &id.hashPubKey, 3035 GNUNET_CONTAINER_multihashmap_put (t->peers, &id.hashPubKey,
@@ -7915,8 +7909,7 @@ handle_local_show_tunnel (void *cls, struct GNUNET_SERVER_Client *client,
7915 *resp = *msg; 7909 *resp = *msg;
7916 resp->npeers = 0; 7910 resp->npeers = 0;
7917 ctx.msg = resp; 7911 ctx.msg = resp;
7918 ctx.lookup = GNUNET_CONTAINER_multihashmap_create (4 * t->peers_total, 7912 ctx.lookup = GNUNET_CONTAINER_multihashmap_create (32, GNUNET_YES);
7919 GNUNET_YES);
7920 ctx.c = c; 7913 ctx.c = c;
7921 7914
7922 /* Collect and send information */ 7915 /* Collect and send information */