aboutsummaryrefslogtreecommitdiff
path: root/src/mesh
diff options
context:
space:
mode:
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);