[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r10931 - gnunet/src/hostlist
From: |
gnunet |
Subject: |
[GNUnet-SVN] r10931 - gnunet/src/hostlist |
Date: |
Fri, 16 Apr 2010 12:29:15 +0200 |
Author: wachs
Date: 2010-04-16 12:29:15 +0200 (Fri, 16 Apr 2010)
New Revision: 10931
Modified:
gnunet/src/hostlist/hostlist-client.c
gnunet/src/hostlist/hostlist-client.h
Log:
Hostlists are now saved to disk regularly
Modified: gnunet/src/hostlist/hostlist-client.c
===================================================================
--- gnunet/src/hostlist/hostlist-client.c 2010-04-16 10:15:52 UTC (rev
10930)
+++ gnunet/src/hostlist/hostlist-client.c 2010-04-16 10:29:15 UTC (rev
10931)
@@ -747,13 +747,6 @@
}
/**
- * Compute when we should save the hostlist entries the next time;
- * then schedule the task accordingly.
- */
-static void
-schedule_hostlist_saving_task ();
-
-/**
* Task that checks if we should try to download a hostlist.
* If so, we initiate the download, otherwise we schedule
* this task again for a later time.
@@ -768,19 +761,9 @@
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
_("Scheduled saving of hostlists\n"));
save_hostlist_file ( GNUNET_NO );
- /*schedule_hostlist_saving_task ();*/
-}
-/**
- * Compute when we should save the hostlist entries the next time;
- * then schedule the task accordingly.
- */
-static void
-schedule_hostlist_saving_task ()
-{
-
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- _("Hostlists will be saved to file again in %llums\n"),
+ _("Hostlists will be saved to file again in %llums\n"),
(unsigned long long) SAVING_INTERVALL.value);
saving_task = GNUNET_SCHEDULER_add_delayed (sched,
SAVING_INTERVALL,
@@ -1193,8 +1176,15 @@
linked_list_head = NULL;
linked_list_tail = NULL;
load_hostlist_file ();
- // schedule_hostlist_saving_task ();
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ _("Hostlists will be saved to file again in %llums\n"),
+ (unsigned long long) SAVING_INTERVALL.value);
+ saving_task = GNUNET_SCHEDULER_add_delayed (sched,
+ SAVING_INTERVALL,
+ &hostlist_saving_task,
+ NULL);
+
GNUNET_STATISTICS_get (stats,
"hostlist",
gettext_noop("# seconds between hostlist downloads"),
Modified: gnunet/src/hostlist/hostlist-client.h
===================================================================
--- gnunet/src/hostlist/hostlist-client.h 2010-04-16 10:15:52 UTC (rev
10930)
+++ gnunet/src/hostlist/hostlist-client.h 2010-04-16 10:29:15 UTC (rev
10931)
@@ -33,7 +33,7 @@
#include "gnunet_time_lib.h"
#define MAX_NUMBER_HOSTLISTS 30
-#define SAVING_INTERVALL GNUNET_TIME_relative_multiply
(GNUNET_TIME_UNIT_MINUTES, 5)
+#define SAVING_INTERVALL GNUNET_TIME_relative_multiply
(GNUNET_TIME_UNIT_MINUTES, 30)
/*
* Defines concerning the hostlist quality metric
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r10931 - gnunet/src/hostlist,
gnunet <=