diff options
-rw-r--r-- | src/hostlist/hostlist-client.c | 28 | ||||
-rw-r--r-- | src/hostlist/hostlist-client.h | 2 |
2 files changed, 10 insertions, 20 deletions
diff --git a/src/hostlist/hostlist-client.c b/src/hostlist/hostlist-client.c index 7370899bd..a9bddb061 100644 --- a/src/hostlist/hostlist-client.c +++ b/src/hostlist/hostlist-client.c | |||
@@ -747,13 +747,6 @@ schedule_hostlist_task () | |||
747 | } | 747 | } |
748 | 748 | ||
749 | /** | 749 | /** |
750 | * Compute when we should save the hostlist entries the next time; | ||
751 | * then schedule the task accordingly. | ||
752 | */ | ||
753 | static void | ||
754 | schedule_hostlist_saving_task (); | ||
755 | |||
756 | /** | ||
757 | * Task that checks if we should try to download a hostlist. | 750 | * Task that checks if we should try to download a hostlist. |
758 | * If so, we initiate the download, otherwise we schedule | 751 | * If so, we initiate the download, otherwise we schedule |
759 | * this task again for a later time. | 752 | * this task again for a later time. |
@@ -768,19 +761,9 @@ hostlist_saving_task (void *cls, | |||
768 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 761 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
769 | _("Scheduled saving of hostlists\n")); | 762 | _("Scheduled saving of hostlists\n")); |
770 | save_hostlist_file ( GNUNET_NO ); | 763 | save_hostlist_file ( GNUNET_NO ); |
771 | /*schedule_hostlist_saving_task ();*/ | ||
772 | } | ||
773 | |||
774 | /** | ||
775 | * Compute when we should save the hostlist entries the next time; | ||
776 | * then schedule the task accordingly. | ||
777 | */ | ||
778 | static void | ||
779 | schedule_hostlist_saving_task () | ||
780 | { | ||
781 | 764 | ||
782 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 765 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
783 | _("Hostlists will be saved to file again in %llums\n"), | 766 | _("Hostlists will be saved to file again in %llums\n"), |
784 | (unsigned long long) SAVING_INTERVALL.value); | 767 | (unsigned long long) SAVING_INTERVALL.value); |
785 | saving_task = GNUNET_SCHEDULER_add_delayed (sched, | 768 | saving_task = GNUNET_SCHEDULER_add_delayed (sched, |
786 | SAVING_INTERVALL, | 769 | SAVING_INTERVALL, |
@@ -1193,7 +1176,14 @@ GNUNET_HOSTLIST_client_start (const struct GNUNET_CONFIGURATION_Handle *c, | |||
1193 | linked_list_head = NULL; | 1176 | linked_list_head = NULL; |
1194 | linked_list_tail = NULL; | 1177 | linked_list_tail = NULL; |
1195 | load_hostlist_file (); | 1178 | load_hostlist_file (); |
1196 | // schedule_hostlist_saving_task (); | 1179 | |
1180 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | ||
1181 | _("Hostlists will be saved to file again in %llums\n"), | ||
1182 | (unsigned long long) SAVING_INTERVALL.value); | ||
1183 | saving_task = GNUNET_SCHEDULER_add_delayed (sched, | ||
1184 | SAVING_INTERVALL, | ||
1185 | &hostlist_saving_task, | ||
1186 | NULL); | ||
1197 | 1187 | ||
1198 | GNUNET_STATISTICS_get (stats, | 1188 | GNUNET_STATISTICS_get (stats, |
1199 | "hostlist", | 1189 | "hostlist", |
diff --git a/src/hostlist/hostlist-client.h b/src/hostlist/hostlist-client.h index a147e25cd..1e1237a82 100644 --- a/src/hostlist/hostlist-client.h +++ b/src/hostlist/hostlist-client.h | |||
@@ -33,7 +33,7 @@ | |||
33 | #include "gnunet_time_lib.h" | 33 | #include "gnunet_time_lib.h" |
34 | 34 | ||
35 | #define MAX_NUMBER_HOSTLISTS 30 | 35 | #define MAX_NUMBER_HOSTLISTS 30 |
36 | #define SAVING_INTERVALL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 5) | 36 | #define SAVING_INTERVALL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 30) |
37 | 37 | ||
38 | /* | 38 | /* |
39 | * Defines concerning the hostlist quality metric | 39 | * Defines concerning the hostlist quality metric |