aboutsummaryrefslogtreecommitdiff
path: root/src/gns/gnunet-service-gns.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-07-02 12:58:17 +0000
committerChristian Grothoff <christian@grothoff.org>2012-07-02 12:58:17 +0000
commitd1e3ef8bf421f69e2c32f4f5d014b1c9fc8cee1b (patch)
treed11d502ee5870ee65e7c457a29b9dc1ca46ff167 /src/gns/gnunet-service-gns.c
parent82face163cbd6afd0067180287de9339f3ac3077 (diff)
downloadgnunet-d1e3ef8bf421f69e2c32f4f5d014b1c9fc8cee1b.tar.gz
gnunet-d1e3ef8bf421f69e2c32f4f5d014b1c9fc8cee1b.zip
-use proper time API
Diffstat (limited to 'src/gns/gnunet-service-gns.c')
-rw-r--r--src/gns/gnunet-service-gns.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/src/gns/gnunet-service-gns.c b/src/gns/gnunet-service-gns.c
index bbf7c4ce5..48067c95e 100644
--- a/src/gns/gnunet-service-gns.c
+++ b/src/gns/gnunet-service-gns.c
@@ -182,7 +182,7 @@ static int num_public_records;
182 */ 182 */
183static unsigned long long max_record_put_interval; 183static unsigned long long max_record_put_interval;
184 184
185static unsigned long long dht_max_update_interval; 185static struct GNUNET_TIME_Relative dht_max_update_interval;
186 186
187/* dht update interval FIXME define? */ 187/* dht update interval FIXME define? */
188static struct GNUNET_TIME_Relative record_put_interval; 188static struct GNUNET_TIME_Relative record_put_interval;
@@ -329,14 +329,10 @@ put_gns_record(void *cls,
329 if (NULL == name) 329 if (NULL == name)
330 { 330 {
331 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 331 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
332 "Zone iteration finished. Rescheduling put in %ds\n", 332 "Zone iteration finished. Rescheduling put in %llus\n",
333 dht_max_update_interval); 333 (unsigned long long) dht_max_update_interval.rel_value / 1000LL);
334 namestore_iter = NULL; 334 namestore_iter = NULL;
335 zone_update_taskid = GNUNET_SCHEDULER_add_delayed ( 335 zone_update_taskid = GNUNET_SCHEDULER_add_delayed (dht_max_update_interval,
336 GNUNET_TIME_relative_multiply(
337 GNUNET_TIME_UNIT_SECONDS,
338 dht_max_update_interval
339 ),
340 &update_zone_dht_start, 336 &update_zone_dht_start,
341 NULL); 337 NULL);
342 return; 338 return;
@@ -1226,16 +1222,16 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
1226 1222
1227 } 1223 }
1228 1224
1229 dht_max_update_interval = GNUNET_GNS_DHT_MAX_UPDATE_INTERVAL; 1225 dht_max_update_interval.rel_value = GNUNET_GNS_DHT_MAX_UPDATE_INTERVAL; // yuck
1230 1226
1231 if (GNUNET_OK == 1227 if (GNUNET_OK ==
1232 GNUNET_CONFIGURATION_get_value_number (c, "gns", 1228 GNUNET_CONFIGURATION_get_value_time (c, "gns",
1233 "ZONE_PUT_INTERVAL", 1229 "ZONE_PUT_INTERVAL",
1234 &dht_max_update_interval)) 1230 &dht_max_update_interval))
1235 { 1231 {
1236 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1232 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
1237 "DHT zone update interval: %llu\n", 1233 "DHT zone update interval: %llu\n",
1238 dht_max_update_interval); 1234 (unsigned long long) dht_max_update_interval.rel_value);
1239 } 1235 }
1240 1236
1241 max_record_put_interval = 1; 1237 max_record_put_interval = 1;