aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/namestore_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-04-25 16:18:31 +0200
committerChristian Grothoff <christian@grothoff.org>2018-04-25 16:18:31 +0200
commit4dc79497d7f745996068e62e973e34d220580323 (patch)
treee6d429d3cf2240ec3459f1d4533201dc40b27015 /src/namestore/namestore_api.c
parentbdbb7c684f2c9711989d2543ecc08a95be23e6c4 (diff)
downloadgnunet-4dc79497d7f745996068e62e973e34d220580323.tar.gz
gnunet-4dc79497d7f745996068e62e973e34d220580323.zip
extend namestore API to enable faster iterations by returning more than one result at a time
Diffstat (limited to 'src/namestore/namestore_api.c')
-rw-r--r--src/namestore/namestore_api.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c
index 05bdf17da..65d3d75d0 100644
--- a/src/namestore/namestore_api.c
+++ b/src/namestore/namestore_api.c
@@ -1281,9 +1281,12 @@ GNUNET_NAMESTORE_zone_iteration_start (struct GNUNET_NAMESTORE_Handle *h,
1281 * for the next record. 1281 * for the next record.
1282 * 1282 *
1283 * @param it the iterator 1283 * @param it the iterator
1284 * @param limit number of records to return to the iterator in one shot
1285 * (before #GNUNET_NAMESTORE_zone_iterator_next is to be called again)
1284 */ 1286 */
1285void 1287void
1286GNUNET_NAMESTORE_zone_iterator_next (struct GNUNET_NAMESTORE_ZoneIterator *it) 1288GNUNET_NAMESTORE_zone_iterator_next (struct GNUNET_NAMESTORE_ZoneIterator *it,
1289 uint64_t limit)
1287{ 1290{
1288 struct GNUNET_NAMESTORE_Handle *h = it->h; 1291 struct GNUNET_NAMESTORE_Handle *h = it->h;
1289 struct ZoneIterationNextMessage *msg; 1292 struct ZoneIterationNextMessage *msg;
@@ -1294,6 +1297,7 @@ GNUNET_NAMESTORE_zone_iterator_next (struct GNUNET_NAMESTORE_ZoneIterator *it)
1294 env = GNUNET_MQ_msg (msg, 1297 env = GNUNET_MQ_msg (msg,
1295 GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_NEXT); 1298 GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_NEXT);
1296 msg->gns_header.r_id = htonl (it->op_id); 1299 msg->gns_header.r_id = htonl (it->op_id);
1300 msg->limit = GNUNET_htonll (limit);
1297 GNUNET_MQ_send (h->mq, 1301 GNUNET_MQ_send (h->mq,
1298 env); 1302 env);
1299} 1303}