*/
/**
- * @file block/plugin_block_fs.c
+ * @file fs/plugin_block_fs.c
* @brief blocks used for file-sharing
* @author Christian Grothoff
*/
#include "block_fs.h"
#include "gnunet_signatures.h"
-#define DEBUG_FS_BLOCK GNUNET_EXTRA_LOGGING
/**
* Number of bits we set per entry in the bloomfilter.
*/
static enum GNUNET_BLOCK_EvaluationResult
block_plugin_fs_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
- const GNUNET_HashCode * query,
+ const struct GNUNET_HashCode * query,
struct GNUNET_CONTAINER_BloomFilter **bf,
int32_t bf_mutator, const void *xquery,
size_t xquery_size, const void *reply_block,
size_t reply_block_size)
{
const struct SBlock *sb;
- GNUNET_HashCode chash;
- GNUNET_HashCode mhash;
- const GNUNET_HashCode *nsid;
- GNUNET_HashCode sh;
+ struct GNUNET_HashCode chash;
+ struct GNUNET_HashCode mhash;
+ const struct GNUNET_HashCode *nsid;
+ struct GNUNET_HashCode sh;
switch (type)
{
}
return GNUNET_BLOCK_EVALUATION_OK_MORE;
case GNUNET_BLOCK_TYPE_FS_SBLOCK:
- if (xquery_size != sizeof (GNUNET_HashCode))
+ if (xquery_size != sizeof (struct GNUNET_HashCode))
{
GNUNET_break_op (0);
return GNUNET_BLOCK_EVALUATION_REQUEST_INVALID;
GNUNET_CRYPTO_hash (&sb->subspace,
sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
&sh);
- if (0 != memcmp (nsid, &sh, sizeof (GNUNET_HashCode)))
- {
- GNUNET_log_from (GNUNET_ERROR_TYPE_WARNING, "block-fs",
- _
- ("Reply mismatched in terms of namespace. Discarded.\n"));
- return GNUNET_BLOCK_EVALUATION_RESULT_INVALID;
- }
+ if (0 != memcmp (nsid, &sh, sizeof (struct GNUNET_HashCode)))
+ return GNUNET_BLOCK_EVALUATION_RESULT_IRRELEVANT;
if (NULL != bf)
{
GNUNET_CRYPTO_hash (reply_block, reply_block_size, &chash);
static int
block_plugin_fs_get_key (void *cls, enum GNUNET_BLOCK_Type type,
const void *block, size_t block_size,
- GNUNET_HashCode * key)
+ struct GNUNET_HashCode * key)
{
const struct KBlock *kb;
const struct SBlock *sb;