- add framework for mesh2 mutipeer tests
[oweals/gnunet.git] / src / mesh / plugin_block_mesh.c
index f0dae71744bbbf29bc894bc0cf685581665165f5..3d99201f7877c2e6bfc91bc85e538d99eba1ce21 100644 (file)
@@ -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);