aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2013-08-03 00:34:59 +0000
committerBart Polot <bart@net.in.tum.de>2013-08-03 00:34:59 +0000
commit298bfd6efbe712b87236768c438b7dbd36a63100 (patch)
tree26681aaf032949d4578cd8bab0c01e4abf9a4c1c /src
parent04e071e4b0a1a749516e2d9226892a0a6485e3c6 (diff)
downloadgnunet-298bfd6efbe712b87236768c438b7dbd36a63100.tar.gz
gnunet-298bfd6efbe712b87236768c438b7dbd36a63100.zip
- fixes
Diffstat (limited to 'src')
-rw-r--r--src/mesh/gnunet-service-mesh-enc.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/src/mesh/gnunet-service-mesh-enc.c b/src/mesh/gnunet-service-mesh-enc.c
index 1c655c3b9..223861ea6 100644
--- a/src/mesh/gnunet-service-mesh-enc.c
+++ b/src/mesh/gnunet-service-mesh-enc.c
@@ -2607,6 +2607,8 @@ tunnel_use_path (struct MeshTunnel2 *t, struct MeshPeerPath *p)
2607 * some of its peers. Sends a notification towards the root of the tree. 2607 * some of its peers. Sends a notification towards the root of the tree.
2608 * In case the peer is the owner of the tree, notifies the client that owns 2608 * In case the peer is the owner of the tree, notifies the client that owns
2609 * the tunnel and tries to reconnect. 2609 * the tunnel and tries to reconnect.
2610 *
2611 * FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME
2610 * 2612 *
2611 * @param t Tunnel affected. 2613 * @param t Tunnel affected.
2612 * @param p1 Peer that got disconnected from p2. 2614 * @param p1 Peer that got disconnected from p2.
@@ -4386,7 +4388,7 @@ handle_mesh_connection_ack (void *cls, const struct GNUNET_PeerIdentity *peer,
4386 GNUNET_DHT_get_stop (c->t->peer->dhtget); 4388 GNUNET_DHT_get_stop (c->t->peer->dhtget);
4387 c->t->peer->dhtget = NULL; 4389 c->t->peer->dhtget = NULL;
4388 } 4390 }
4389 connection_send_ack (c, GNUNET_NO); /* FIXME */ 4391 //connection_send_ack (c, GNUNET_NO); /* FIXME */
4390 return GNUNET_OK; 4392 return GNUNET_OK;
4391 } 4393 }
4392 4394
@@ -4399,34 +4401,34 @@ handle_mesh_connection_ack (void *cls, const struct GNUNET_PeerIdentity *peer,
4399/** 4401/**
4400 * Core handler for notifications of broken paths 4402 * Core handler for notifications of broken paths
4401 * 4403 *
4402 * @param cls closure 4404 * @param cls Closure (unused).
4403 * @param message message 4405 * @param peer Peer identity of sending neighbor.
4404 * @param peer peer identity this notification is about 4406 * @param message Message.
4405 * 4407 *
4406 * @return GNUNET_OK to keep the connection open, 4408 * @return GNUNET_OK to keep the connection open,
4407 * GNUNET_SYSERR to close it (signal serious error) 4409 * GNUNET_SYSERR to close it (signal serious error)
4408 */ 4410 */
4409static int 4411static int
4410handle_mesh_path_broken (void *cls, const struct GNUNET_PeerIdentity *peer, 4412handle_mesh_connection_broken (void *cls, const struct GNUNET_PeerIdentity *peer,
4411 const struct GNUNET_MessageHeader *message) 4413 const struct GNUNET_MessageHeader *message)
4412{ 4414{
4413 struct GNUNET_MESH_PathBroken *msg; 4415 struct GNUNET_MESH_ConnectionBroken *msg;
4414 struct MeshTunnel *t; 4416 struct MeshConnection *c;
4415 4417
4416 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 4418 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
4417 "Received a PATH BROKEN msg from %s\n", GNUNET_i2s (peer)); 4419 "Received a CONNECTION BROKEN msg from %s\n", GNUNET_i2s (peer));
4418 msg = (struct GNUNET_MESH_PathBroken *) message; 4420 msg = (struct GNUNET_MESH_ConnectionBroken *) message;
4419 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " regarding %s\n", 4421 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " regarding %s\n",
4420 GNUNET_i2s (&msg->peer1)); 4422 GNUNET_i2s (&msg->peer1));
4421 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " regarding %s\n", 4423 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " regarding %s\n",
4422 GNUNET_i2s (&msg->peer2)); 4424 GNUNET_i2s (&msg->peer2));
4423 t = channel_get (&msg->oid, ntohl (msg->tid)); 4425 c = connection_get (&msg->tid, ntohl (msg->cid));
4424 if (NULL == t) 4426 if (NULL == c)
4425 { 4427 {
4426 GNUNET_break_op (0); 4428 GNUNET_break_op (0);
4427 return GNUNET_OK; 4429 return GNUNET_OK;
4428 } 4430 }
4429 tunnel_notify_connection_broken (t, GNUNET_PEER_search (&msg->peer1), 4431 tunnel_notify_connection_broken (c->t, GNUNET_PEER_search (&msg->peer1),
4430 GNUNET_PEER_search (&msg->peer2)); 4432 GNUNET_PEER_search (&msg->peer2));
4431 return GNUNET_OK; 4433 return GNUNET_OK;
4432 4434
@@ -5008,8 +5010,8 @@ static struct GNUNET_CORE_MessageHandler core_handlers[] = {
5008 0}, 5010 0},
5009 {&handle_mesh_connection_ack, GNUNET_MESSAGE_TYPE_MESH_CONNECTION_ACK, 5011 {&handle_mesh_connection_ack, GNUNET_MESSAGE_TYPE_MESH_CONNECTION_ACK,
5010 sizeof (struct GNUNET_MESH_ConnectionACK)}, 5012 sizeof (struct GNUNET_MESH_ConnectionACK)},
5011 {&handle_mesh_path_broken, GNUNET_MESSAGE_TYPE_MESH_PATH_BROKEN, 5013 {&handle_mesh_connection_broken, GNUNET_MESSAGE_TYPE_MESH_CONNECTION_BROKEN,
5012 sizeof (struct GNUNET_MESH_PathBroken)}, 5014 sizeof (struct GNUNET_MESH_ConnectionBroken)},
5013 {&handle_mesh_tunnel_destroy, GNUNET_MESSAGE_TYPE_MESH_TUNNEL_DESTROY, 5015 {&handle_mesh_tunnel_destroy, GNUNET_MESSAGE_TYPE_MESH_TUNNEL_DESTROY,
5014 sizeof (struct GNUNET_MESH_TunnelDestroy)}, 5016 sizeof (struct GNUNET_MESH_TunnelDestroy)},
5015 {&handle_mesh_unicast, GNUNET_MESSAGE_TYPE_MESH_UNICAST, 0}, 5017 {&handle_mesh_unicast, GNUNET_MESSAGE_TYPE_MESH_UNICAST, 0},