diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-02-28 21:12:03 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-02-28 21:12:03 +0000 |
commit | 3a2737d76679c68331fad0be0b89d8efdcde5079 (patch) | |
tree | 5bd4ef163438954cdcb75558e6368a297629b56d /src/gns/plugin_block_gns.c | |
parent | 9c46ed792caae948fd99cca44deaf5a265af7614 (diff) | |
download | gnunet-3a2737d76679c68331fad0be0b89d8efdcde5079.tar.gz gnunet-3a2737d76679c68331fad0be0b89d8efdcde5079.zip |
-extend block API to allow specifying flags, use this to allow reducing checks for replies from local DB
Diffstat (limited to 'src/gns/plugin_block_gns.c')
-rw-r--r-- | src/gns/plugin_block_gns.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/gns/plugin_block_gns.c b/src/gns/plugin_block_gns.c index a677f7f62..8c08c4fc2 100644 --- a/src/gns/plugin_block_gns.c +++ b/src/gns/plugin_block_gns.c | |||
@@ -44,6 +44,7 @@ | |||
44 | * | 44 | * |
45 | * @param cls closure | 45 | * @param cls closure |
46 | * @param type block type | 46 | * @param type block type |
47 | * @param eo control flags | ||
47 | * @param query original query (hash) | 48 | * @param query original query (hash) |
48 | * @param bf pointer to bloom filter associated with @a query; possibly updated (!) | 49 | * @param bf pointer to bloom filter associated with @a query; possibly updated (!) |
49 | * @param bf_mutator mutation value for @a bf | 50 | * @param bf_mutator mutation value for @a bf |
@@ -54,12 +55,16 @@ | |||
54 | * @return characterization of result | 55 | * @return characterization of result |
55 | */ | 56 | */ |
56 | static enum GNUNET_BLOCK_EvaluationResult | 57 | static enum GNUNET_BLOCK_EvaluationResult |
57 | block_plugin_gns_evaluate (void *cls, enum GNUNET_BLOCK_Type type, | 58 | block_plugin_gns_evaluate (void *cls, |
58 | const struct GNUNET_HashCode *query, | 59 | enum GNUNET_BLOCK_Type type, |
59 | struct GNUNET_CONTAINER_BloomFilter **bf, | 60 | enum GNUNET_BLOCK_EvaluationOptions eo, |
60 | int32_t bf_mutator, const void *xquery, | 61 | const struct GNUNET_HashCode *query, |
61 | size_t xquery_size, const void *reply_block, | 62 | struct GNUNET_CONTAINER_BloomFilter **bf, |
62 | size_t reply_block_size) | 63 | int32_t bf_mutator, |
64 | const void *xquery, | ||
65 | size_t xquery_size, | ||
66 | const void *reply_block, | ||
67 | size_t reply_block_size) | ||
63 | { | 68 | { |
64 | const struct GNUNET_GNSRECORD_Block *block; | 69 | const struct GNUNET_GNSRECORD_Block *block; |
65 | struct GNUNET_HashCode h; | 70 | struct GNUNET_HashCode h; |