fix zonemaster delay calculation
authorChristian Grothoff <christian@grothoff.org>
Sun, 13 May 2018 09:48:27 +0000 (11:48 +0200)
committerChristian Grothoff <christian@grothoff.org>
Sun, 13 May 2018 09:48:39 +0000 (11:48 +0200)
src/zonemaster/gnunet-service-zonemaster.c

index 719a84107cb3160a2bf5b4e5ff9ad4b94b192011..1c8fad7005fb050b46868e5078c1b9233be511b5 100644 (file)
@@ -501,6 +501,9 @@ check_zone_namestore_next ()
                          GNUNET_NO);
   delay = GNUNET_TIME_relative_multiply (delay,
                                          NS_BLOCK_SIZE);
+  /* make sure we do not overshoot because of the #NS_BLOCK_SIZE factor */
+  delay = GNUNET_TIME_relative_min (MAXIMUM_ZONE_ITERATION_INTERVAL,
+                                    delay);
   GNUNET_assert (NULL == zone_publish_task);
   zone_publish_task = GNUNET_SCHEDULER_add_delayed (delay,
                                                     &publish_zone_namestore_next,