aboutsummaryrefslogtreecommitdiff
path: root/src/dht/gnunet-service-dht_neighbours.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-02-28 21:12:03 +0000
committerChristian Grothoff <christian@grothoff.org>2015-02-28 21:12:03 +0000
commit3a2737d76679c68331fad0be0b89d8efdcde5079 (patch)
tree5bd4ef163438954cdcb75558e6368a297629b56d /src/dht/gnunet-service-dht_neighbours.c
parent9c46ed792caae948fd99cca44deaf5a265af7614 (diff)
downloadgnunet-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/dht/gnunet-service-dht_neighbours.c')
-rw-r--r--src/dht/gnunet-service-dht_neighbours.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/dht/gnunet-service-dht_neighbours.c b/src/dht/gnunet-service-dht_neighbours.c
index 9e23be3bc..caa226dad 100644
--- a/src/dht/gnunet-service-dht_neighbours.c
+++ b/src/dht/gnunet-service-dht_neighbours.c
@@ -1708,6 +1708,7 @@ handle_dht_p2p_put (void *cls, const struct GNUNET_PeerIdentity *peer,
1708 { 1708 {
1709 switch (GNUNET_BLOCK_evaluate (GDS_block_context, 1709 switch (GNUNET_BLOCK_evaluate (GDS_block_context,
1710 ntohl (put->type), 1710 ntohl (put->type),
1711 GNUNET_BLOCK_EO_NONE,
1711 NULL, /* query */ 1712 NULL, /* query */
1712 NULL, 0, /* bloom filer */ 1713 NULL, 0, /* bloom filer */
1713 NULL, 0, /* xquery */ 1714 NULL, 0, /* xquery */
@@ -1953,8 +1954,16 @@ handle_dht_p2p_get (void *cls,
1953 GNUNET_CONTAINER_bloomfilter_init (&xquery[xquery_size], reply_bf_size, 1954 GNUNET_CONTAINER_bloomfilter_init (&xquery[xquery_size], reply_bf_size,
1954 GNUNET_CONSTANTS_BLOOMFILTER_K); 1955 GNUNET_CONSTANTS_BLOOMFILTER_K);
1955 eval = 1956 eval =
1956 GNUNET_BLOCK_evaluate (GDS_block_context, type, &get->key, &reply_bf, 1957 GNUNET_BLOCK_evaluate (GDS_block_context,
1957 get->bf_mutator, xquery, xquery_size, NULL, 0); 1958 type,
1959 GNUNET_BLOCK_EO_NONE,
1960 &get->key,
1961 &reply_bf,
1962 get->bf_mutator,
1963 xquery,
1964 xquery_size,
1965 NULL,
1966 0);
1958 if (eval != GNUNET_BLOCK_EVALUATION_REQUEST_VALID) 1967 if (eval != GNUNET_BLOCK_EVALUATION_REQUEST_VALID)
1959 { 1968 {
1960 /* request invalid or block type not supported */ 1969 /* request invalid or block type not supported */