aboutsummaryrefslogtreecommitdiff
path: root/src/mesh
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2013-02-14 17:22:01 +0000
committerBart Polot <bart@net.in.tum.de>2013-02-14 17:22:01 +0000
commit032046e9034d6e4ff63910df2b846c0bc9d18b34 (patch)
treeef85d955c6192b2d6d3b01864f3bfbed85315681 /src/mesh
parentf25e1bdd066cf5a06bd6a3f5ed1806007259b546 (diff)
downloadgnunet-032046e9034d6e4ff63910df2b846c0bc9d18b34.tar.gz
gnunet-032046e9034d6e4ff63910df2b846c0bc9d18b34.zip
- fix
Diffstat (limited to 'src/mesh')
-rw-r--r--src/mesh/plugin_block_mesh.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesh/plugin_block_mesh.c b/src/mesh/plugin_block_mesh.c
index f0dae7174..3d99201f7 100644
--- a/src/mesh/plugin_block_mesh.c
+++ b/src/mesh/plugin_block_mesh.c
@@ -149,6 +149,7 @@ block_plugin_mesh_get_key (void *cls, enum GNUNET_BLOCK_Type type,
149 struct GNUNET_HashCode * key) 149 struct GNUNET_HashCode * key)
150{ 150{
151 const struct PBlock *pb; 151 const struct PBlock *pb;
152 GNUNET_MESH_ApplicationType app_type;
152 pb = block; 153 pb = block;
153 154
154 switch (type) 155 switch (type)
@@ -159,7 +160,8 @@ block_plugin_mesh_get_key (void *cls, enum GNUNET_BLOCK_Type type,
159 *key = pb->id.hashPubKey; 160 *key = pb->id.hashPubKey;
160 return GNUNET_OK; 161 return GNUNET_OK;
161 case GNUNET_BLOCK_TYPE_MESH_PEER_BY_TYPE: 162 case GNUNET_BLOCK_TYPE_MESH_PEER_BY_TYPE:
162 GNUNET_CRYPTO_hash (&pb->type, sizeof(GNUNET_MESH_ApplicationType), key); 163 app_type = ntohl (pb->type);
164 GNUNET_CRYPTO_hash (&app_type, sizeof(GNUNET_MESH_ApplicationType), key);
163 return GNUNET_OK; 165 return GNUNET_OK;
164 default: 166 default:
165 GNUNET_break (0); 167 GNUNET_break (0);