diff options
author | Bart Polot <bart@net.in.tum.de> | 2013-08-13 10:52:37 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2013-08-13 10:52:37 +0000 |
commit | b5cd8634eec7e85f75e1889da0020a67f6ac2319 (patch) | |
tree | 771775fdd256ef390c69dcf17171eef07ab42e5f | |
parent | 48858242167c2161a4fdc0654ae0bf36f340633f (diff) | |
download | gnunet-b5cd8634eec7e85f75e1889da0020a67f6ac2319.tar.gz gnunet-b5cd8634eec7e85f75e1889da0020a67f6ac2319.zip |
- fixes
-rw-r--r-- | src/mesh/gnunet-service-mesh-enc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mesh/gnunet-service-mesh-enc.c b/src/mesh/gnunet-service-mesh-enc.c index 5cf939286..48b673488 100644 --- a/src/mesh/gnunet-service-mesh-enc.c +++ b/src/mesh/gnunet-service-mesh-enc.c | |||
@@ -1610,6 +1610,8 @@ send_prebuilt_message_connection (const struct GNUNET_MessageHeader *message, | |||
1610 | size_t size; | 1610 | size_t size; |
1611 | uint16_t type; | 1611 | uint16_t type; |
1612 | 1612 | ||
1613 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Send on Connection %s[%X]\n", | ||
1614 | GNUNET_h2s (&c->t->id), c->id); | ||
1613 | neighbor = connection_get_hop (c, fwd); | 1615 | neighbor = connection_get_hop (c, fwd); |
1614 | if (NULL == neighbor) | 1616 | if (NULL == neighbor) |
1615 | { | 1617 | { |
@@ -1664,6 +1666,8 @@ send_prebuilt_message_tunnel (struct GNUNET_MESH_Encrypted *msg, | |||
1664 | struct MeshConnection *c; | 1666 | struct MeshConnection *c; |
1665 | uint16_t type; | 1667 | uint16_t type; |
1666 | 1668 | ||
1669 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Send on Tunnel %s\n", | ||
1670 | GNUNET_h2s (&t->id)); | ||
1667 | c = tunnel_get_connection (t, fwd); | 1671 | c = tunnel_get_connection (t, fwd); |
1668 | if (NULL == c) | 1672 | if (NULL == c) |
1669 | { | 1673 | { |
@@ -1708,12 +1712,14 @@ send_prebuilt_message_channel (const struct GNUNET_MessageHeader *message, | |||
1708 | uint16_t type; | 1712 | uint16_t type; |
1709 | uint64_t iv; | 1713 | uint64_t iv; |
1710 | 1714 | ||
1715 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Send on Channel %s:%X\n", | ||
1716 | GNUNET_h2s (&ch->t->id), ch->gid); | ||
1711 | type = fwd ? GNUNET_MESSAGE_TYPE_MESH_FWD : GNUNET_MESSAGE_TYPE_MESH_BCK; | 1717 | type = fwd ? GNUNET_MESSAGE_TYPE_MESH_FWD : GNUNET_MESSAGE_TYPE_MESH_BCK; |
1712 | iv = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, UINT64_MAX); | 1718 | iv = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_NONCE, UINT64_MAX); |
1713 | 1719 | ||
1714 | msg = (struct GNUNET_MESH_Encrypted *) cbuf; | 1720 | msg = (struct GNUNET_MESH_Encrypted *) cbuf; |
1715 | msg->header.type = htons (type); | 1721 | msg->header.type = htons (type); |
1716 | msg->header.size = htons (size); | 1722 | msg->header.size = htons (sizeof (struct GNUNET_MESH_Encrypted) + size); |
1717 | msg->iv = GNUNET_htonll (iv); | 1723 | msg->iv = GNUNET_htonll (iv); |
1718 | tunnel_encrypt (ch->t, &msg[1], message, size, iv, fwd); | 1724 | tunnel_encrypt (ch->t, &msg[1], message, size, iv, fwd); |
1719 | 1725 | ||