types
[oweals/gnunet.git] / src / hostlist / gnunet-daemon-hostlist.c
index da2553238bcc7c0673909886edd811b9ad24f8a9..7d075cf808df69ffd43b961fbbb171d76b916ae0 100644 (file)
  * @file hostlist/gnunet-daemon-hostlist.c
  * @brief code for bootstrapping via hostlist servers
  * @author Christian Grothoff
+ *
+ * TODO:
+ * - implement -a and -e switches (send P2P messages about our hostlist URL,
+ *   receive such messages and automatically update our hostlist URL config
+ *   value).
  */
 
 #include <stdlib.h>
@@ -69,13 +74,17 @@ static struct GNUNET_STATISTICS_Handle *stats;
  * gnunet-daemon-hostlist command line options.
  */
 static struct GNUNET_GETOPT_CommandLineOption options[] = {
-  { 'a', "advertise", NULL, gettext_noop ("advertise our hostlist to other peers"),
+  { 'a', "advertise", NULL, 
+    gettext_noop ("advertise our hostlist to other peers"),
     GNUNET_NO, &GNUNET_GETOPT_set_one, &advertising },
-  { 'b', "bootstrap", NULL, gettext_noop ("bootstrap using hostlists (it is highly recommended that you always use this option)"),
+  { 'b', "bootstrap", NULL, 
+    gettext_noop ("bootstrap using hostlists (it is highly recommended that you always use this option)"),
     GNUNET_NO, &GNUNET_GETOPT_set_one, &bootstrapping },
-  { 'e', "enable-learning", NULL, gettext_noop ("enable learning about hostlist servers from other peers"),
+  { 'e', "enable-learning", NULL,
+    gettext_noop ("enable learning about hostlist servers from other peers"),
     GNUNET_NO, &GNUNET_GETOPT_set_one, &learning},
-  { 'p', "provide-hostlist", NULL, gettext_noop ("provide a hostlist server"),
+  { 'p', "provide-hostlist", NULL, 
+    gettext_noop ("provide a hostlist server"),
     GNUNET_NO, &GNUNET_GETOPT_set_one, &provide_hostlist},
   GNUNET_GETOPT_OPTION_END
 };
@@ -92,7 +101,7 @@ core_init (void *cls,
 {
   if (advertising && (NULL != server))
     {    
-      /* TODO: provide "server" to 'hostlist' module */
+      /* FIXME: provide "server" to 'hostlist' module */
     }
 }
 
@@ -126,7 +135,7 @@ run (void *cls,
      struct GNUNET_SCHEDULER_Handle * sched,
      char *const *args,
      const char *cfgfile,
-     struct GNUNET_CONFIGURATION_Handle * cfg)
+     const struct GNUNET_CONFIGURATION_Handle * cfg)
 {
   GNUNET_CORE_ClientEventHandler ch = NULL;
   GNUNET_CORE_ClientEventHandler dh = NULL;
@@ -146,8 +155,7 @@ run (void *cls,
   stats = GNUNET_STATISTICS_create (sched, "hostlist", cfg);
   if (learning)
     {
-      // FIXME!
-      // (register handler with core for hostlist ads)
+      /* FIXME (register handler with core for hostlist ads) */
     }
   if (bootstrapping)
     {
@@ -170,7 +178,7 @@ run (void *cls,
   GNUNET_SCHEDULER_add_delayed (sched,
                                 GNUNET_YES,
                                 GNUNET_SCHEDULER_PRIORITY_IDLE,
-                                GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
+                                GNUNET_SCHEDULER_NO_TASK,
                                 GNUNET_TIME_UNIT_FOREVER_REL,
                                 &cleaning_task, NULL);
 }