From: Bart Polot Date: Thu, 14 Feb 2013 17:22:01 +0000 (+0000) Subject: - fix X-Git-Tag: initial-import-from-subversion-38251~9920 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=032046e9034d6e4ff63910df2b846c0bc9d18b34;p=oweals%2Fgnunet.git - fix --- 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);