aboutsummaryrefslogtreecommitdiff
path: root/src/mesh
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2012-12-20 16:34:46 +0000
committerBart Polot <bart@net.in.tum.de>2012-12-20 16:34:46 +0000
commit07102f00b119c466fcf2468c1c7844521aa79d00 (patch)
treee1bcdd08a2f9b641b30459de7c58e341431e4d4e /src/mesh
parentbba2e2319102386c93bbb4cd2af784be553ff22d (diff)
downloadgnunet-07102f00b119c466fcf2468c1c7844521aa79d00.tar.gz
gnunet-07102f00b119c466fcf2468c1c7844521aa79d00.zip
- initialize message for both directions
Diffstat (limited to 'src/mesh')
-rw-r--r--src/mesh/gnunet-service-mesh.c10
-rw-r--r--src/mesh/test_mesh_small.conf2
2 files changed, 5 insertions, 7 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c
index 7119bb4ab..7fae00227 100644
--- a/src/mesh/gnunet-service-mesh.c
+++ b/src/mesh/gnunet-service-mesh.c
@@ -4387,20 +4387,18 @@ tunnel_send_destroy (struct MeshTunnel *t, int send_back)
4387 struct GNUNET_PeerIdentity id; 4387 struct GNUNET_PeerIdentity id;
4388 GNUNET_PEER_Id parent; 4388 GNUNET_PEER_Id parent;
4389 4389
4390 msg.header.size = htons (sizeof (msg));
4391 msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_TUNNEL_DESTROY);
4392 GNUNET_PEER_resolve (t->id.oid, &msg.oid);
4393 msg.tid = htonl (t->id.tid);
4390 if (tree_count_children(t->tree) > 0) 4394 if (tree_count_children(t->tree) > 0)
4391 { 4395 {
4392 msg.header.size = htons (sizeof (msg));
4393 msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_TUNNEL_DESTROY);
4394 GNUNET_PEER_resolve (t->id.oid, &msg.oid);
4395 msg.tid = htonl (t->id.tid);
4396 tunnel_send_multicast (t, &msg.header); 4396 tunnel_send_multicast (t, &msg.header);
4397 } 4397 }
4398 parent = tree_get_predecessor(t->tree); 4398 parent = tree_get_predecessor(t->tree);
4399 if (GNUNET_NO == send_back || 0 == parent) 4399 if (GNUNET_NO == send_back || 0 == parent)
4400 return; 4400 return;
4401 4401
4402 msg.header.size = htons (sizeof (msg));
4403 msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_TUNNEL_DESTROY);
4404 GNUNET_PEER_resolve (parent, &id); 4402 GNUNET_PEER_resolve (parent, &id);
4405 send_prebuilt_message(&msg.header, &id, t); 4403 send_prebuilt_message(&msg.header, &id, t);
4406} 4404}
diff --git a/src/mesh/test_mesh_small.conf b/src/mesh/test_mesh_small.conf
index 943ef3638..f9d50b4e6 100644
--- a/src/mesh/test_mesh_small.conf
+++ b/src/mesh/test_mesh_small.conf
@@ -11,7 +11,7 @@ ID_ANNOUNCE_TIME = 2 s
11CONNECT_TIMEOUT = 30 s 11CONNECT_TIMEOUT = 30 s
12DEFAULT_TTL = 64 12DEFAULT_TTL = 64
13DHT_REPLICAITON_LEVEL = 3 13DHT_REPLICAITON_LEVEL = 3
14# PREFIX = valgrind --leak-check=full --suppressions=valgrind-mesh.supp 14PREFIX = valgrind --leak-check=full --suppressions=valgrind-mesh.supp
15# PREFIX = xterm -geometry 100x85 -T peer1 -e gdb --args 15# PREFIX = xterm -geometry 100x85 -T peer1 -e gdb --args
16 16
17[testbed] 17[testbed]