diff options
author | Bart Polot <bart@net.in.tum.de> | 2011-09-30 17:15:33 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2011-09-30 17:15:33 +0000 |
commit | b30311c9144c094659e984bc304432671262591b (patch) | |
tree | 1a240da85b66639a3003af25938dc15a13f18a77 /src/mesh | |
parent | ba5dd9b5260f0c59476e47b4cbf89ab211afd3c5 (diff) | |
download | gnunet-b30311c9144c094659e984bc304432671262591b.tar.gz gnunet-b30311c9144c094659e984bc304432671262591b.zip |
Debug statements
Diffstat (limited to 'src/mesh')
-rw-r--r-- | src/mesh/gnunet-service-mesh.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index 21ebfa634..9f302dcda 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c | |||
@@ -555,8 +555,8 @@ announce_id (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
555 | * - Set data expiration in function of X | 555 | * - Set data expiration in function of X |
556 | * - Adapt X to churn | 556 | * - Adapt X to churn |
557 | */ | 557 | */ |
558 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: DHT_put for ID %s started.\n", | 558 | // GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: DHT_put for ID %s started.\n", |
559 | GNUNET_h2s_full (&my_full_id.hashPubKey)); | 559 | // GNUNET_h2s_full (&my_full_id.hashPubKey)); |
560 | // GNUNET_DHT_put (dht_handle, /* DHT handle */ FIXME DHT | 560 | // GNUNET_DHT_put (dht_handle, /* DHT handle */ FIXME DHT |
561 | // &my_full_id.hashPubKey, /* Key to use */ | 561 | // &my_full_id.hashPubKey, /* Key to use */ |
562 | // 10U, /* Replication level */ | 562 | // 10U, /* Replication level */ |
@@ -1546,7 +1546,7 @@ handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
1546 | struct MeshTunnel *t; | 1546 | struct MeshTunnel *t; |
1547 | 1547 | ||
1548 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1548 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1549 | "MESH: Received a MESH path create msg\n"); | 1549 | "MESH: Received a path create msg\n"); |
1550 | size = ntohs (message->size); | 1550 | size = ntohs (message->size); |
1551 | if (size < sizeof (struct GNUNET_MESH_ManipulatePath)) | 1551 | if (size < sizeof (struct GNUNET_MESH_ManipulatePath)) |
1552 | { | 1552 | { |
@@ -1566,15 +1566,21 @@ handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
1566 | GNUNET_break_op (0); | 1566 | GNUNET_break_op (0); |
1567 | return GNUNET_OK; | 1567 | return GNUNET_OK; |
1568 | } | 1568 | } |
1569 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1570 | "MESH: path as %u hops.\n", | ||
1571 | size); | ||
1569 | msg = (struct GNUNET_MESH_ManipulatePath *) message; | 1572 | msg = (struct GNUNET_MESH_ManipulatePath *) message; |
1570 | 1573 | ||
1571 | tid = ntohl (msg->tid); | 1574 | tid = ntohl (msg->tid); |
1572 | pi = (struct GNUNET_PeerIdentity *) &msg[1]; | 1575 | pi = (struct GNUNET_PeerIdentity *) &msg[1]; |
1573 | t = tunnel_get (pi, tid); | 1576 | t = tunnel_get (pi, tid); |
1574 | 1577 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | |
1578 | "MESH: path as for tunnel %s [%X].\n", | ||
1579 | GNUNET_i2s(pi), | ||
1580 | tid); | ||
1575 | if (NULL == t) | 1581 | if (NULL == t) |
1576 | { | 1582 | { |
1577 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: Creating tunnel\n"); | 1583 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MESH: Creating tunnel\n"); |
1578 | t = GNUNET_malloc (sizeof (struct MeshTunnel)); | 1584 | t = GNUNET_malloc (sizeof (struct MeshTunnel)); |
1579 | t->id.oid = GNUNET_PEER_intern (pi); | 1585 | t->id.oid = GNUNET_PEER_intern (pi); |
1580 | t->id.tid = tid; | 1586 | t->id.tid = tid; |
@@ -1588,7 +1594,6 @@ handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
1588 | GNUNET_break (0); | 1594 | GNUNET_break (0); |
1589 | return GNUNET_OK; | 1595 | return GNUNET_OK; |
1590 | } | 1596 | } |
1591 | |||
1592 | } | 1597 | } |
1593 | dest_peer_info = | 1598 | dest_peer_info = |
1594 | GNUNET_CONTAINER_multihashmap_get (peers, &pi[size - 1].hashPubKey); | 1599 | GNUNET_CONTAINER_multihashmap_get (peers, &pi[size - 1].hashPubKey); |
@@ -1635,7 +1640,7 @@ handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
1635 | info = GNUNET_malloc (sizeof (struct MeshDataDescriptor)); | 1640 | info = GNUNET_malloc (sizeof (struct MeshDataDescriptor)); |
1636 | info->origin = &t->id; | 1641 | info->origin = &t->id; |
1637 | info->peer = GNUNET_CONTAINER_multihashmap_get (peers, &id.hashPubKey); | 1642 | info->peer = GNUNET_CONTAINER_multihashmap_get (peers, &id.hashPubKey); |
1638 | GNUNET_assert (info->peer); | 1643 | GNUNET_assert (NULL != info->peer); |
1639 | for (j = 0; info->peer->core_transmit[j]; j++) | 1644 | for (j = 0; info->peer->core_transmit[j]; j++) |
1640 | { | 1645 | { |
1641 | if (j == 9) | 1646 | if (j == 9) |