aboutsummaryrefslogtreecommitdiff
path: root/src/zonemaster
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/zonemaster
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/zonemaster')
-rw-r--r--src/zonemaster/gnunet-service-zonemaster.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/zonemaster/gnunet-service-zonemaster.c b/src/zonemaster/gnunet-service-zonemaster.c
index bf11f7d20..f40f25c3f 100644
--- a/src/zonemaster/gnunet-service-zonemaster.c
+++ b/src/zonemaster/gnunet-service-zonemaster.c
@@ -250,7 +250,8 @@ publish_zone_dht_next (void *cls)
250{ 250{
251 zone_publish_task = NULL; 251 zone_publish_task = NULL;
252 GNUNET_assert (NULL != namestore_iter); 252 GNUNET_assert (NULL != namestore_iter);
253 GNUNET_NAMESTORE_zone_iterator_next (namestore_iter); 253 GNUNET_NAMESTORE_zone_iterator_next (namestore_iter,
254 1);
254} 255}
255 256
256 257
@@ -393,7 +394,10 @@ perform_dht_put (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key,
393 rd_public, 394 rd_public,
394 rd_public_count); 395 rd_public_count);
395 if (NULL == block) 396 if (NULL == block)
397 {
398 GNUNET_break (0);
396 return NULL; /* whoops */ 399 return NULL; /* whoops */
400 }
397 block_size = ntohl (block->purpose.size) 401 block_size = ntohl (block->purpose.size)
398 + sizeof (struct GNUNET_CRYPTO_EcdsaSignature) 402 + sizeof (struct GNUNET_CRYPTO_EcdsaSignature)
399 + sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey); 403 + sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey);
@@ -565,8 +569,10 @@ put_gns_record (void *cls,
565 NULL); 569 NULL);
566 if (NULL == active_put) 570 if (NULL == active_put)
567 { 571 {
568 GNUNET_break (0); 572 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
569 dht_put_continuation (NULL, GNUNET_NO); 573 "Could not perform DHT PUT, is the DHT running?\n");
574 dht_put_continuation (NULL,
575 GNUNET_NO);
570 } 576 }
571} 577}
572 578