- moved timeout handling responsibility from for nat tests from caller to the library
[oweals/gnunet.git] / src / peerstore / gnunet-service-peerstore.c
index 41820485078963e9ebb39f5492ca2a64e15f7363..140db80d8795714b5dbbfa534c696be9bf575066 100644 (file)
@@ -32,7 +32,7 @@
 /**
  * Interval for expired records cleanup (in seconds)
  */
-#define CLEANUP_INTERVAL 300 /* 5mins */
+#define EXPIRED_RECORDS_CLEANUP_INTERVAL 300 /* 5mins */
 
 /**
  * Our configuration.
@@ -96,7 +96,7 @@ cleanup_expired_records(void *cls,
   deleted = db->expire_records(db->cls, GNUNET_TIME_absolute_get());
   GNUNET_log(GNUNET_ERROR_TYPE_INFO, "%d records expired.\n", deleted);
   GNUNET_SCHEDULER_add_delayed(
-      GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, CLEANUP_INTERVAL),
+      GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, EXPIRED_RECORDS_CLEANUP_INTERVAL),
       &cleanup_expired_records, NULL);
 }
 
@@ -202,7 +202,6 @@ void watch_notifier (struct GNUNET_PEERSTORE_Record *record)
 {
   struct GNUNET_HashCode keyhash;
 
-  GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Sending update to any watchers.\n");
   PEERSTORE_hash_key(record->sub_system,
       record->peer,
       record->key,
@@ -279,6 +278,10 @@ void handle_iterate (void *cls,
     GNUNET_SERVER_receive_done(client, GNUNET_SYSERR);
     return;
   }
+  GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Iterate request: ss `%s', peer `%s', key `%s'\n",
+      record->sub_system,
+      (NULL == record->peer) ? "NULL" : GNUNET_i2s(record->peer),
+      (NULL == record->key) ? "NULL" : record->key);
   GNUNET_SERVER_notification_context_add(nc, client);
   if(GNUNET_OK == db->iterate_records(db->cls,
       record->sub_system,