From 032046e9034d6e4ff63910df2b846c0bc9d18b34 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Thu, 14 Feb 2013 17:22:01 +0000 Subject: [PATCH] - fix --- src/mesh/plugin_block_mesh.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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, struct GNUNET_HashCode * key) { const struct PBlock *pb; + GNUNET_MESH_ApplicationType app_type; pb = block; switch (type) @@ -159,7 +160,8 @@ block_plugin_mesh_get_key (void *cls, enum GNUNET_BLOCK_Type type, *key = pb->id.hashPubKey; return GNUNET_OK; case GNUNET_BLOCK_TYPE_MESH_PEER_BY_TYPE: - GNUNET_CRYPTO_hash (&pb->type, sizeof(GNUNET_MESH_ApplicationType), key); + app_type = ntohl (pb->type); + GNUNET_CRYPTO_hash (&app_type, sizeof(GNUNET_MESH_ApplicationType), key); return GNUNET_OK; default: GNUNET_break (0); -- 2.25.1